From e7f0f904e85f710a044d5429e1fd8919b2b12121 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mario=20H=C3=BCttel?= Date: Thu, 14 Nov 2019 23:39:12 +0100 Subject: [PATCH] main: Free command line option context, add comment for freeing all the command line parameter data --- main.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/main.c b/main.c index ffe948d..1feaa54 100644 --- a/main.c +++ b/main.c @@ -290,6 +290,8 @@ int main(int argc, char **argv) exit(1); } + g_option_context_free(context); + if (version) { print_version(); goto ret_status; @@ -317,7 +319,10 @@ int main(int argc, char **argv) } 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) g_strfreev(output_paths); if (renderer_args)