main: Free command line option context, add comment for freeing all the command line parameter data

This commit is contained in:
Mario Hüttel 2019-11-14 23:39:12 +01:00
parent d8f6981fe6
commit e7f0f904e8

7
main.c
View File

@ -290,6 +290,8 @@ int main(int argc, char **argv)
exit(1); exit(1);
} }
g_option_context_free(context);
if (version) { if (version) {
print_version(); print_version();
goto ret_status; goto ret_status;
@ -317,7 +319,10 @@ int main(int argc, char **argv)
} }
ret_status: ret_status:
/* If necessary, free command line parameters */ /* If necessary, free command line parameters.
* This is only really necessary for automated mem-leak testing.
* Omitting these frees would be perfectly fine.
*/
if (output_paths) if (output_paths)
g_strfreev(output_paths); g_strfreev(output_paths);
if (renderer_args) if (renderer_args)