瀏覽代碼

qcacmn: Avoid double free in wlan_cfg80211_sched_scan_start()

In wlan_cfg80211_sched_scan_start() in the case where
wlan_cfg80211_is_chan_ok_for_dnbs() returns failure,
"req" is freed both at the point where the test occurs
as well as at label "error". Since label error provides
centralized cleanup for all of the error cases,
remove the free at the point where the test occurs.

Change-Id: Ibde90c58d76d1db48ee3f12c251be5eaa2b68c7b
CRs-Fixed: 2372789
Qun Zhang 6 年之前
父節點
當前提交
84da07f17e
共有 1 個文件被更改,包括 0 次插入1 次删除
  1. 0 1
      os_if/linux/scan/src/wlan_cfg80211_scan.c

+ 0 - 1
os_if/linux/scan/src/wlan_cfg80211_scan.c

@@ -445,7 +445,6 @@ int wlan_cfg80211_sched_scan_start(struct wlan_objmgr_vdev *vdev,
 								  &ok);
 				if (QDF_IS_STATUS_ERROR(status)) {
 					cfg80211_err("DNBS check failed");
-					qdf_mem_free(req);
 					ret = -EINVAL;
 					goto error;
 				}