Commit 5926f234 authored by Ray Strode's avatar Ray Strode

gdm-{wayland,x}-session: fix segfault if run with no arguments

Right now we crash on clean up paths if the programs are invoked wrong.

This commit fixes that.

https://bugzilla.gnome.org/show_bug.cgi?id=770561
parent ce2ef875
......@@ -545,9 +545,11 @@ main (int argc,
}
out:
signal_subprocesses (state);
wait_on_subprocesses (state);
clear_state (&state);
if (state != NULL) {
signal_subprocesses (state);
wait_on_subprocesses (state);
clear_state (&state);
}
return exit_status;
}
......@@ -921,9 +921,11 @@ main (int argc,
}
out:
signal_subprocesses (state);
wait_on_subprocesses (state);
clear_state (&state);
if (state != NULL) {
signal_subprocesses (state);
wait_on_subprocesses (state);
clear_state (&state);
}
return exit_status;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment