From dafda298f3f888aa8a332c0130da698e8d55c0f6 Mon Sep 17 00:00:00 2001 From: Naveen Rawat Date: Wed, 6 Jan 2016 18:32:14 -0800 Subject: [PATCH] qcacld-3.0: Fix memory leak in hdd_send_re_assoc_event In case kmalloc fail goto end of function and properly free other possible allocated memory buffers. Change-Id: I41d7577471b475b0a2a0daa83c6ffc845314ceb4 CRs-Fixed: 958755 --- core/hdd/src/wlan_hdd_assoc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/hdd/src/wlan_hdd_assoc.c b/core/hdd/src/wlan_hdd_assoc.c index 06c8c16cc711..2f1d820c2116 100644 --- a/core/hdd/src/wlan_hdd_assoc.c +++ b/core/hdd/src/wlan_hdd_assoc.c @@ -1379,12 +1379,12 @@ static void hdd_send_re_assoc_event(struct net_device *dev, if (!rspRsnIe) { hddLog(LOGE, FL("Unable to allocate RSN IE")); - return; + goto done; } if (!assoc_req_ies) { hdd_err("Unable to allocate Assoc Req IE"); - return; + goto done; } if (pCsrRoamInfo == NULL) { hddLog(LOGE, FL("Invalid CSR roam info"));