From 058c8636a7d2f258dc4268089f66fc90895e5737 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sat, 18 May 2013 09:49:26 +0300 Subject: [PATCH] FT RRB: Fix a memory leak on error path Signed-hostap: Jouni Malinen --- src/ap/wpa_auth_ft.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ap/wpa_auth_ft.c b/src/ap/wpa_auth_ft.c index 791b48d42..1bb5d97ae 100644 --- a/src/ap/wpa_auth_ft.c +++ b/src/ap/wpa_auth_ft.c @@ -1218,8 +1218,10 @@ static int wpa_ft_rrb_rx_request(struct wpa_authenticator *wpa_auth, rlen = 2 + 2 * ETH_ALEN + 2 + resp_ies_len; frame = os_malloc(sizeof(*frame) + rlen); - if (frame == NULL) + if (frame == NULL) { + os_free(resp_ies); return -1; + } frame->frame_type = RSN_REMOTE_FRAME_TYPE_FT_RRB; frame->packet_type = FT_PACKET_RESPONSE; frame->action_length = host_to_le16(rlen);