[PATCH] This fixes memory leak problem.
Purushottam Kushwaha
p.kushwaha
Fri May 29 02:20:41 PDT 2015
Avoid memory leak due to previous malloc for (ssid->ssid).
Signed-off-by: Purushottam Kushwaha <p.kushwaha at samsung.com>
---
wpa_supplicant/wps_supplicant.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/wpa_supplicant/wps_supplicant.c b/wpa_supplicant/wps_supplicant.c
index 8a5cb8e..8830af9 100644
--- a/wpa_supplicant/wps_supplicant.c
+++ b/wpa_supplicant/wps_supplicant.c
@@ -1187,6 +1187,8 @@ static int wpas_wps_start_dev_pw(struct wpa_supplicant *wpa_s,
}
#ifdef CONFIG_P2P
if (p2p_group && wpa_s->go_params && wpa_s->go_params->ssid_len) {
+ if(ssid->ssid)
+ os_free(ssid->ssid);
ssid->ssid = os_zalloc(wpa_s->go_params->ssid_len + 1);
if (ssid->ssid) {
ssid->ssid_len = wpa_s->go_params->ssid_len;
--
1.9.1
More information about the Hostap
mailing list