[PATCH] Avoid to update probe response IE when IE pointer is NULL

Stone Piao piaoyun
Thu Jan 24 12:20:46 PST 2013


Signed-off-by: Stone Piao <piaoyun at marvell.com>
---
 wpa_supplicant/p2p_supplicant.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/wpa_supplicant/p2p_supplicant.c b/wpa_supplicant/p2p_supplican=
t.c
index 0a09b00..c1ac6fa 100644
--- a/wpa_supplicant/p2p_supplicant.c
+++ b/wpa_supplicant/p2p_supplicant.c
@@ -4153,8 +4153,10 @@ static void wpas_p2p_ie_update(void *ctx, struct wpa=
buf *beacon_ies,
 			wpabuf_free(hapd->p2p_beacon_ie);
 			hapd->p2p_beacon_ie =3D beacon_ies;
 		}
-		wpabuf_free(hapd->p2p_probe_resp_ie);
-		hapd->p2p_probe_resp_ie =3D proberesp_ies;
+		if (proberesp_ies) {
+			wpabuf_free(hapd->p2p_probe_resp_ie);
+			hapd->p2p_probe_resp_ie =3D proberesp_ies;
+		}
 	} else {
 		wpabuf_free(beacon_ies);
 		wpabuf_free(proberesp_ies);
--=20
1.7.3.4


-Stone=20




More information about the Hostap mailing list