From: Jouni Malinen Date: Mon, 29 Mar 2010 16:59:16 +0000 (-0700) Subject: Fix ctrl_iface get-STA-MIB for WPS disabled case X-Git-Tag: hostap_0_7_2~119 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a042f8447dc7d89f2aa7db0d95d3987ebfbf3d3a;p=thirdparty%2Fhostap.git Fix ctrl_iface get-STA-MIB for WPS disabled case The previous version would crash here on NULL pointer dereference if WPS was disabled. --- diff --git a/src/ap/wps_hostapd.c b/src/ap/wps_hostapd.c index d5145f0f2..cc05813fb 100644 --- a/src/ap/wps_hostapd.c +++ b/src/ap/wps_hostapd.c @@ -894,5 +894,7 @@ static void hostapd_wps_upnp_deinit(struct hostapd_data *hapd) int hostapd_wps_get_mib_sta(struct hostapd_data *hapd, const u8 *addr, char *buf, size_t buflen) { + if (hapd->wps == NULL) + return 0; return wps_registrar_get_info(hapd->wps->registrar, addr, buf, buflen); }