mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-25 14:13:01 -04:00
qcacld-3.0: Fix memory leak in wlan_hdd_get_peer_stats
In the current implementation of the function wlan_hdd_get_peer_stats, if the status returned by the call cdp_host_get_peer_stats is not successful, then it returns from the function without freeing the memory allocated to peer_stats. This causes a memory leak. To avoid this issue, free the memory properly before returning from the function. Change-Id: Ia002be4cf6c0b93eba2dc65d96d63e6c0eafad90 CRs-Fixed: 2932487
This commit is contained in:
parent
d4703ebb2e
commit
4d31c10ff0
1 changed files with 1 additions and 0 deletions
|
|
@ -1651,6 +1651,7 @@ static int hdd_get_peer_stats(struct hdd_adapter *adapter,
|
|||
stainfo->sta_mac.bytes, peer_stats);
|
||||
if (status != QDF_STATUS_SUCCESS) {
|
||||
hdd_err("cdp_host_get_peer_stats failed");
|
||||
qdf_mem_free(peer_stats);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue