소스 검색

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;
 				}