Browse Source

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
Rajeev Kumar Sirasanagandla 6 năm trước cách đây
mục cha
commit
2feb421680
1 tập tin đã thay đổi với 1 bổ sung0 xóa
  1. 1 0
      core/hdd/src/wlan_hdd_cfg80211.c

+ 1 - 0
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]) {