]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
EAP-LEAP: Fix possible memory leak in eap_leap_process_request()
authorIlan Peer <ilan.peer@intel.com>
Thu, 8 Jun 2017 08:17:57 +0000 (11:17 +0300)
committerJouni Malinen <j@w1.fi>
Sat, 8 Jul 2017 13:14:03 +0000 (16:14 +0300)
Free 'resp' object in case of a failure to derive the response.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
src/eap_peer/eap_leap.c

index 7bb62e72d6f37eae3e07a58e81552127556c4cb0..233b9eeb1f83ffb16c6ec8e456d0544388baeb96 100644 (file)
@@ -120,6 +120,7 @@ static struct wpabuf * eap_leap_process_request(struct eap_sm *sm, void *priv,
             nt_challenge_response(challenge, password, password_len, rpos))) {
                wpa_printf(MSG_DEBUG, "EAP-LEAP: Failed to derive response");
                ret->ignore = TRUE;
+               wpabuf_free(resp);
                return NULL;
        }
        os_memcpy(data->peer_response, rpos, LEAP_RESPONSE_LEN);