aboutsummaryrefslogtreecommitdiffstats
path: root/src/ap/wpa_auth_ft.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2013-05-18 06:49:26 (GMT)
committerJouni Malinen <j@w1.fi>2013-05-18 06:49:26 (GMT)
commit058c8636a7d2f258dc4268089f66fc90895e5737 (patch)
tree45b0912247e888f517334908019a7646e36b5569 /src/ap/wpa_auth_ft.c
parentc6ccf12d3f6f35e295f9522dded535da8af6ab98 (diff)
downloadhostap-058c8636a7d2f258dc4268089f66fc90895e5737.zip
hostap-058c8636a7d2f258dc4268089f66fc90895e5737.tar.gz
hostap-058c8636a7d2f258dc4268089f66fc90895e5737.tar.bz2
FT RRB: Fix a memory leak on error path
Signed-hostap: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'src/ap/wpa_auth_ft.c')
-rw-r--r--src/ap/wpa_auth_ft.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/ap/wpa_auth_ft.c b/src/ap/wpa_auth_ft.c
index 791b48d..1bb5d97 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);