From 5312f8ea0476c4723e81289b6a22ab86d4dd3112 Mon Sep 17 00:00:00 2001 From: Jeff Johnson Date: Fri, 30 Mar 2018 09:16:10 -0700 Subject: [PATCH] qcacld-3.0: Avoid double free in drv_cmd_get_ibss_peer_info_all() Change "qcacld-3.0: Fix memory leak issues in HDD" (Change-Id: Iae551cd3acbb6bc2618f05cfdc33e4f742d63192) added logic to drv_cmd_get_ibss_peer_info_all() to free the dynamically-allocated buffer "extra" when either of the copy_to_user() calls failed. Unfortunately this introduced a regression since now in the success case the "extra" buffer is freed twice. Update drv_cmd_get_ibss_peer_info_all() to remove the now unnecessary call to qdf_mem_free() in the success case. Change-Id: I7f8c17cd7576bf05ac8b6c4d6658ac40cb55782a CRs-Fixed: 2215443 --- core/hdd/src/wlan_hdd_ioctl.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/core/hdd/src/wlan_hdd_ioctl.c b/core/hdd/src/wlan_hdd_ioctl.c index a16af0f544..72417481be 100644 --- a/core/hdd/src/wlan_hdd_ioctl.c +++ b/core/hdd/src/wlan_hdd_ioctl.c @@ -5058,9 +5058,6 @@ static int drv_cmd_get_ibss_peer_info_all(struct hdd_adapter *adapter, } hdd_debug("%s", &extra[numOfBytestoPrint]); } - - /* Free temporary buffer */ - qdf_mem_free(extra); } else { /* Command failed, log error */ hdd_err("GETIBSSPEERINFOALL command failed with status code %d",