From 9288e6625b2c84d1bd9afd6fc1444a1660bdd4a7 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sat, 9 Feb 2013 00:44:13 +0200 Subject: [PATCH] EAP-IKEV2 server: Fix invalid memory freeing operation wpabuf needs to be freed with wpabuf_free(), not os_free(). Signed-hostap: Jouni Malinen --- src/eap_server/ikev2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/eap_server/ikev2.c b/src/eap_server/ikev2.c index 0e77efb7a..512ba3074 100644 --- a/src/eap_server/ikev2.c +++ b/src/eap_server/ikev2.c @@ -990,7 +990,7 @@ static int ikev2_build_kei(struct ikev2_initiator_data *data, */ wpabuf_put(msg, data->dh->prime_len - wpabuf_len(pv)); wpabuf_put_buf(msg, pv); - os_free(pv); + wpabuf_free(pv); plen = (u8 *) wpabuf_put(msg, 0) - (u8 *) phdr; WPA_PUT_BE16(phdr->payload_length, plen);