Make sure to free cfg resource in allocated during cfg_init when case of pe_open failure happen. Change-Id: I651585dabec344253fb3015d974f9f4685d24304 CRs-Fixed: 2027588
@@ -141,8 +141,10 @@ tSirRetStatus mac_open(struct wlan_objmgr_psoc *psoc, tHalHandle *pHalHandle,
p_mac->first_scan_done = false;
status = pe_open(p_mac, cds_cfg);
- if (eSIR_SUCCESS != status)
+ if (eSIR_SUCCESS != status) {
pe_err("pe_open() failure");
+ cfg_de_init(p_mac);
+ }
return status;
}