mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-26 06:33:19 -04:00
msm: ipa: Avoid use-after-free scenario
Introduce changes to avoid use-after-free scenarios by accessing the memory before freeing it. Change-Id: Iaa5d29b400cad593045f3644cb60a51fc09682e8 Signed-off-by: Prasad Arepalli <quic_parepall@quicinc.com>
This commit is contained in:
parent
e42faf170b
commit
610bee83fa
1 changed files with 2 additions and 1 deletions
|
|
@ -1,6 +1,7 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright (c) 2017-2021, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
|
||||
*/
|
||||
|
||||
#include <linux/debugfs.h>
|
||||
|
|
@ -770,9 +771,9 @@ int ipa_pm_register(struct ipa_pm_register_params *params, u32 *hdl)
|
|||
client->skip_clk_vote = params->skip_clk_vote;
|
||||
client->wlock = wakeup_source_register(NULL, client->name);
|
||||
if (!client->wlock) {
|
||||
ipa_pm_deregister(*hdl);
|
||||
IPA_PM_ERR("IPA wakeup source register failed %s\n",
|
||||
client->name);
|
||||
ipa_pm_deregister(*hdl);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue