]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
FT RRB: Fix a memory leak on error path
authorJouni Malinen <j@w1.fi>
Sat, 18 May 2013 06:49:26 +0000 (09:49 +0300)
committerJouni Malinen <j@w1.fi>
Sat, 18 May 2013 06:49:26 +0000 (09:49 +0300)
Signed-hostap: Jouni Malinen <j@w1.fi>

src/ap/wpa_auth_ft.c

index 791b48d42be29513d71318160ccfe4f8ae0fb6e3..1bb5d97ae5e449365e44d86530dc8d009774c236 100644 (file)
@@ -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);