Procházet zdrojové kódy

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 před 6 roky
rodič
revize
84da07f17e
1 změnil soubory, kde provedl 0 přidání a 1 odebrání
  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;
 				}