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
2018-03-30 09:16:10 -07:00
提交者 nshrivas
父节点 b5ba25101b
当前提交 5312f8ea04

查看文件

@@ -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",