[PATCH] Avoid to update probe response IE when IE pointer is NULL
Jouni Malinen
j
Sun Feb 3 03:13:17 PST 2013
On Thu, Jan 24, 2013 at 04:30:03AM -0800, Stone Piao wrote:
> Subject: [PATCH] Avoid to update probe response IE when IE pointer is NULL
> diff --git 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 wpabuf *beacon_ies,
> - wpabuf_free(hapd->p2p_probe_resp_ie);
> - hapd->p2p_probe_resp_ie = proberesp_ies;
> + if (proberesp_ies) {
> + wpabuf_free(hapd->p2p_probe_resp_ie);
> + hapd->p2p_probe_resp_ie = proberesp_ies;
> + }
Why would this be needed? The only caller of the ie_update() callback is
p2p_group_update_ies() and it does not use the callback unless
probe_resp_ie is set to non-NULL value.
--
Jouni Malinen PGP id EFC895FA
More information about the Hostap
mailing list