mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2025-01-17 18:34:03 -05:00
wpa_priv: Fix early exit path
eloop_destroy() cannot be called before eloop_init() have been called successfully. Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
8065377199
commit
ebf05623c4
@ -982,20 +982,20 @@ int main(int argc, char *argv[])
|
|||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
usage();
|
usage();
|
||||||
goto out;
|
goto out2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (optind >= argc) {
|
if (optind >= argc) {
|
||||||
usage();
|
usage();
|
||||||
goto out;
|
goto out2;
|
||||||
}
|
}
|
||||||
|
|
||||||
wpa_printf(MSG_DEBUG, "wpa_priv control directory: '%s'", ctrl_dir);
|
wpa_printf(MSG_DEBUG, "wpa_priv control directory: '%s'", ctrl_dir);
|
||||||
|
|
||||||
if (eloop_init()) {
|
if (eloop_init()) {
|
||||||
wpa_printf(MSG_ERROR, "Failed to initialize event loop");
|
wpa_printf(MSG_ERROR, "Failed to initialize event loop");
|
||||||
goto out;
|
goto out2;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = optind; i < argc; i++) {
|
for (i = optind; i < argc; i++) {
|
||||||
@ -1025,7 +1025,9 @@ out:
|
|||||||
|
|
||||||
eloop_destroy();
|
eloop_destroy();
|
||||||
|
|
||||||
os_daemonize_terminate(pid_file);
|
out2:
|
||||||
|
if (daemonize)
|
||||||
|
os_daemonize_terminate(pid_file);
|
||||||
os_free(pid_file);
|
os_free(pid_file);
|
||||||
os_program_deinit();
|
os_program_deinit();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user