Kaynağa Gözat

Merge "msm: ipa: fix to NULL terminate the pointer"

qctecmdr 2 yıl önce
ebeveyn
işleme
257165583a

+ 2 - 0
drivers/platform/msm/ipa/ipa_rm_peers_list.c

@@ -1,6 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0-only
 // SPDX-License-Identifier: GPL-2.0-only
 /*
 /*
  * Copyright (c) 2013-2019, The Linux Foundation. All rights reserved.
  * Copyright (c) 2013-2019, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved
  */
  */
 
 
 #include <linux/slab.h>
 #include <linux/slab.h>
@@ -68,6 +69,7 @@ int ipa_rm_peers_list_create(int max_peers,
 
 
 list_alloc_fail:
 list_alloc_fail:
 	kfree(*peers_list);
 	kfree(*peers_list);
+	*peers_list = NULL;
 bail:
 bail:
 	return result;
 	return result;
 }
 }