mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-28 18:28:23 -05:00
Fix memory leak on wpa_supplicant_init_wpa() error path
If wpa_sm_init() fails, the context data needs to be freed in the caller. Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
52a80583ba
commit
ef0355780a
@ -1040,6 +1040,7 @@ int wpa_supplicant_init_wpa(struct wpa_supplicant *wpa_s)
|
||||
if (wpa_s->wpa == NULL) {
|
||||
wpa_printf(MSG_ERROR, "Failed to initialize WPA state "
|
||||
"machine");
|
||||
os_free(ctx);
|
||||
return -1;
|
||||
}
|
||||
#endif /* CONFIG_NO_WPA */
|
||||
|
Loading…
Reference in New Issue
Block a user