Commit 6022be01 authored by David King's avatar David King Committed by Paolo Bacchilega

Fix fr_application_command_line memory leak

Found with Valgrind:

==9376== 44 (32 direct, 12 indirect) bytes in 1 blocks are definitely
lost in loss record 8,792 of 17,916
==9376==    at 0x4C2BC50: malloc (in
==9376==    by 0x748B689: g_malloc (gmem.c:97)
==9376==    by 0x74BAC72: g_variant_dup_bytestring_array
==9376==    by 0x6F108B9: g_application_command_line_get_arguments
==9376==    by 0x41C146: fr_application_command_line
==9376==    by 0xC750D2F: ffi_call_unix64 (in
==9376==    by 0xC75079A: ffi_call (in /usr/lib64/
==9376==    by 0x71FAB94: g_cclosure_marshal_generic_va
==9376==    by 0x71FA0C3: _g_closure_invoke_va (gclosure.c:864)
==9376==    by 0x7213DD8: g_signal_emit_valist (gsignal.c:3246)
==9376==    by 0x72148F1: g_signal_emit (gsignal.c:3393)
==9376==    by 0x6F0CF82: g_application_call_command_line
==9376==    by 0x6F0F55F: g_application_run (gapplication.c:2292)
==9376==    by 0x414FE5: main (main.c:38)
parent 659b782a
......@@ -531,9 +531,11 @@ fr_application_command_line (GApplication *application,
g_critical ("Failed to parse arguments: %s", error->message);
g_error_free (error);
g_option_context_free (context);
g_strfreev (argv);
return fr_application_command_line_finished (application, EXIT_FAILURE);
g_strfreev (argv);
g_option_context_free (context);
if (remaining_args == NULL) { /* No archive specified. */
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