[gobject-introspection] gdump: do not leak gfile objects
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gobject-introspection] gdump: do not leak gfile objects
- Date: Sun, 8 May 2016 19:35:23 +0000 (UTC)
commit 9f1f2f5efd008aba9e92edd3a44d431b84fa5174
Author: Paolo Borelli <pborelli gnome org>
Date: Fri Apr 22 13:23:51 2016 +0200
gdump: do not leak gfile objects
girepository/gdump.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/girepository/gdump.c b/girepository/gdump.c
index b60a5dc..6aa8bfd 100644
--- a/girepository/gdump.c
+++ b/girepository/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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]