mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 05:39:54 -04:00
msm: ipa: fix to NULL terminate the pointer
Fix to NULL terminate the peers list ptr after freeing it, to get rid of use after free issue. Change-Id: Ide9fde9e7648a7af561a5b0ae0fa085810e59ea6 Signed-off-by: Prashanth Reddy Baddam <quic_pbaddam@quicinc.com>
This commit is contained in:
parent
179ab9d536
commit
f3f4d78a11
1 changed files with 2 additions and 0 deletions
|
|
@ -1,6 +1,7 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright (c) 2013-2019, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved
|
||||
*/
|
||||
|
||||
#include <linux/slab.h>
|
||||
|
|
@ -68,6 +69,7 @@ int ipa_rm_peers_list_create(int max_peers,
|
|||
|
||||
list_alloc_fail:
|
||||
kfree(*peers_list);
|
||||
*peers_list = NULL;
|
||||
bail:
|
||||
return result;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue