EAP-IKEV2 server: Fix invalid memory freeing operation

wpabuf needs to be freed with wpabuf_free(), not os_free().

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
Jouni Malinen 2013-02-09 00:44:13 +02:00 committed by Jouni Malinen
parent 62cab3b737
commit 9288e6625b

View 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(msg, data->dh->prime_len - wpabuf_len(pv));
wpabuf_put_buf(msg, pv); wpabuf_put_buf(msg, pv);
os_free(pv); wpabuf_free(pv);
plen = (u8 *) wpabuf_put(msg, 0) - (u8 *) phdr; plen = (u8 *) wpabuf_put(msg, 0) - (u8 *) phdr;
WPA_PUT_BE16(phdr->payload_length, plen); WPA_PUT_BE16(phdr->payload_length, plen);