From 2feb4216804892d0779e226f86e4f271715fd0aa Mon Sep 17 00:00:00 2001 From: Rajeev Kumar Sirasanagandla Date: Thu, 14 Mar 2019 22:15:02 +0530 Subject: [PATCH] qcacld-3.0: Avoid mem leak in vendor command acs_chan_config While processing vendor command acs_chan_config, in hdd_parse_vendor_acs_chan_config() memory allocated for channel_list is not de-allocated in error scenario. This leads to memory leak. To address this, while returning error, free channel_list in hdd_parse_vendor_acs_chan_config(). Change-Id: Icdd264cfaa2e4266c22bc87c234e4a21122618b6 CRs-Fixed: 2410875 --- core/hdd/src/wlan_hdd_cfg80211.c | 1 + 1 file changed, 1 insertion(+) diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c index d11734099f2d..7f6b4f991601 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.c +++ b/core/hdd/src/wlan_hdd_cfg80211.c @@ -9864,6 +9864,7 @@ static int hdd_parse_vendor_acs_chan_config(struct hdd_vendor_chan_info curr_attr, acs_chan_list_policy)) { hdd_err("nla_parse failed"); + qdf_mem_free(channel_list); return -EINVAL; } if (tb2[SET_EXT_ACS_BAND]) {