commit
ed7b1690f0054888795059c2ef6ddd2f8107786a added an explicit
command parser free call on exit to make memory analysis tools
give better results.
That commit freed the command parser a little too early, though,
before the event loop gets freed and the event loop exit handlers
are run.
The command parser uses an exit handler to clear a weak reference
on the event loop, so freeing the command parser before the event
loop can lead to crash.
This commit moves the free call a little lower.
Related: https://gitlab.freedesktop.org/plymouth/plymouth/-/issues/175
exit_code = ply_event_loop_run (state.loop);
out:
- ply_command_parser_free (state.command_parser);
-
ply_boot_client_free (state.client);
ply_event_loop_free (state.loop);
+ ply_command_parser_free (state.command_parser);
+
return exit_code;
}
/* vim: set ts=4 sw=4 expandtab autoindent cindent cino={.5s,(0: */