EAP-IKEV2 server: Fix invalid memory freeing operation
authorJouni Malinen <jouni@qca.qualcomm.com>
Fri, 8 Feb 2013 22:44:13 +0000 (00:44 +0200)
committerJouni Malinen <j@w1.fi>
Fri, 8 Feb 2013 23:20:36 +0000 (01:20 +0200)
wpabuf needs to be freed with wpabuf_free(), not os_free().

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>

src/eap_server/ikev2.c

index 0e77efb..512ba30 100644 (file)
@@ -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);