IBSS: Fix a memory leak on RSN error path
authorJouni Malinen <j@w1.fi>
Sat, 13 Aug 2016 18:29:53 +0000 (21:29 +0300)
committerJouni Malinen <j@w1.fi>
Sat, 13 Aug 2016 18:29:53 +0000 (21:29 +0300)
Signed-off-by: Jouni Malinen <j@w1.fi>
wpa_supplicant/ibss_rsn.c

index ff9aaba..53d7d57 100644 (file)
@@ -221,6 +221,7 @@ static int ibss_rsn_supp_init(struct ibss_rsn_peer *peer, const u8 *own_addr,
        peer->supp = wpa_sm_init(ctx);
        if (peer->supp == NULL) {
                wpa_printf(MSG_DEBUG, "SUPP: wpa_sm_init() failed");
+               os_free(ctx);
                return -1;
        }