diff options
author | jiangpingping <jiangpingping@xiaomi.com> | 2023-11-16 15:02:17 +0800 |
---|---|---|
committer | Sunil Ravi <sunilravi@google.com> | 2023-11-21 23:29:20 +0000 |
commit | a96a5e8446860fa55d7c359cf55395fab0906276 (patch) | |
tree | 1bd74ba84ba4fab74b43d96d5184e469bb7a2af7 | |
parent | 8bae4256a8a04bbaf9b11e71f7facb724736ee36 (diff) | |
download | wpa_supplicant_8-a96a5e8446860fa55d7c359cf55395fab0906276.tar.gz |
free wfd_r2_dev_info to avoid memmory leak
Bug: 312033374
Allocated memory for wfd_r2_dev_info when the p2p device was found.
But not freed the memory after notifying the R2 information.
This causes memory leak.
Fixed the issue by freeing the memmory for wfd_r2_dev_info after usage.
Bug: 312033374
Test: Wi-Fi Direct Scan and connection via WiFi-Direct settings window
Change-Id: I70d72c4d76e3ee5f23849de6de7acc9282a30f26
Signed-off-by: jiangpingping <jiangpingping@xiaomi.com>
-rw-r--r-- | wpa_supplicant/p2p_supplicant.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/wpa_supplicant/p2p_supplicant.c b/wpa_supplicant/p2p_supplicant.c index 9262e5e8..db991779 100644 --- a/wpa_supplicant/p2p_supplicant.c +++ b/wpa_supplicant/p2p_supplicant.c @@ -2666,6 +2666,7 @@ done: wfd_dev_info_len, wfd_r2_dev_info, wfd_r2_dev_info_len, new_device); os_free(wfd_dev_info); + os_free(wfd_r2_dev_info); } |