Kaynağa Gözat

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
Jeff Johnson 7 yıl önce
ebeveyn
işleme
5312f8ea04
1 değiştirilmiş dosya ile 0 ekleme ve 3 silme
  1. 0 3
      core/hdd/src/wlan_hdd_ioctl.c

+ 0 - 3
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",