From: Jouni Malinen Date: Tue, 3 Jul 2012 17:54:40 +0000 (+0300) Subject: autoscan: Fix potential freeing of uninitialized pointer X-Git-Tag: hostap_2_0~547 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b9b12d02f02e30786a18474dbd8c4c2cc60da3e1;p=thirdparty%2Fhostap.git autoscan: Fix potential freeing of uninitialized pointer Commit 7c865c68536825d91e64e1545a1f6ed51526ebff introduced a code path that can skip extra_ie initialization in wpa_supplicant_scan(). This could result in semi-random crashes when using the autoscan mechanism. Fix this by initializing extra_ie to NULL. Signed-hostap: Jouni Malinen --- diff --git a/wpa_supplicant/scan.c b/wpa_supplicant/scan.c index 477db11c3..10a46931e 100644 --- a/wpa_supplicant/scan.c +++ b/wpa_supplicant/scan.c @@ -432,7 +432,7 @@ static void wpa_supplicant_scan(void *eloop_ctx, void *timeout_ctx) struct wpa_supplicant *wpa_s = eloop_ctx; struct wpa_ssid *ssid; int scan_req = 0, ret; - struct wpabuf *extra_ie; + struct wpabuf *extra_ie = NULL; struct wpa_driver_scan_params params; struct wpa_driver_scan_params *scan_params; size_t max_ssids;