From 84da07f17efd931860586c11916cc7fa504305b2 Mon Sep 17 00:00:00 2001 From: Qun Zhang Date: Wed, 26 Dec 2018 17:49:10 +0800 Subject: [PATCH] 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 --- os_if/linux/scan/src/wlan_cfg80211_scan.c | 1 - 1 file changed, 1 deletion(-) diff --git a/os_if/linux/scan/src/wlan_cfg80211_scan.c b/os_if/linux/scan/src/wlan_cfg80211_scan.c index 6651541cbe68..d1e5cc2dd668 100644 --- a/os_if/linux/scan/src/wlan_cfg80211_scan.c +++ b/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; }