From 50c7ae999c48ba4bf0279c132028c20f12cde39c Mon Sep 17 00:00:00 2001 From: Paolo Borelli Date: Fri, 22 Apr 2016 13:23:51 +0200 Subject: [PATCH] gdump: do not leak gfile objects --- gdump.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/gdump.c b/gdump.c index b60a5dcee..6aa8bfd1c 100644 --- a/gdump.c +++ b/gdump.c @@ -480,10 +480,17 @@ g_irepository_dump (const char *arg, GError **error) g_strfreev (args); input = g_file_read (input_file, NULL, error); + g_object_unref (input_file); + if (input == NULL) - return FALSE; + { + g_object_unref (output_file); + return FALSE; + } output = g_file_replace (output_file, NULL, FALSE, 0, NULL, error); + g_object_unref (output_file); + if (output == NULL) { g_input_stream_close (G_INPUT_STREAM (input), NULL, NULL);