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
This commit is contained in:
Rajeev Kumar Sirasanagandla 2019-03-14 22:15:02 +05:30 • committed by nshrivas
commit 2feb421680

View file

@ -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]) {