From: Jouni Malinen Date: Fri, 13 Jun 2014 22:05:18 +0000 (+0300) Subject: WPS: Check wps_build_wfa_ext() return value consistently (CID 68104) X-Git-Tag: hostap_2_3~306 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=305000e160f26cfbbe93a099027e23bb2bdc97fc;p=thirdparty%2Fhostap.git WPS: Check wps_build_wfa_ext() return value consistently (CID 68104) While this call cannot really fail, check the return value to be more consistent with all the other wps_build_wfa_ext() calls. Signed-off-by: Jouni Malinen --- diff --git a/src/wps/wps_upnp.c b/src/wps/wps_upnp.c index f62b49e60..ae94a9f62 100644 --- a/src/wps/wps_upnp.c +++ b/src/wps/wps_upnp.c @@ -596,7 +596,10 @@ static struct wpabuf * build_fake_wsc_ack(void) wpabuf_put_be16(msg, ATTR_REGISTRAR_NONCE); wpabuf_put_be16(msg, WPS_NONCE_LEN); wpabuf_put(msg, WPS_NONCE_LEN); - wps_build_wfa_ext(msg, 0, NULL, 0); + if (wps_build_wfa_ext(msg, 0, NULL, 0)) { + wpabuf_free(msg); + return NULL; + } return msg; }