ply_error ("%s", help_string);
free (help_string);
- return 1;
+ exit_code = 1;
+ goto out;
}
ply_command_parser_get_options (state.command_parser,
printf ("%s", help_string);
free (help_string);
- return 0;
+ goto out;
}
if (ply_kernel_command_line_has_argument ("plymouth.debug") && !ply_is_tracing ())
if (should_get_plugin_path) {
printf ("%s\n", PLYMOUTH_PLUGIN_PATH);
- return 0;
+ goto out;
}
is_connected = ply_boot_client_connect (state.client,
if (should_ping) {
ply_trace ("ping failed");
- return 1;
+ exit_code = 1;
+ goto out;
}
if (should_check_for_active_vt) {
ply_trace ("has active vt? failed");
- return 1;
+ exit_code = 1;
+ goto out;
}
if (should_wait) {
ply_trace ("no need to wait");
- return 0;
+ goto out;
}
}
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);