[gcab] Fix a memory leak



commit 345f7dfd58caa99f76804c00f26c2bcd721b8221
Author: Marc-Andrà Lureau <marcandre lureau gmail com>
Date:   Sun Jan 20 01:10:51 2013 +0100

    Fix a memory leak

 libgcab/gcab-folder.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/libgcab/gcab-folder.c b/libgcab/gcab-folder.c
index 792b479..8e478b3 100644
--- a/libgcab/gcab-folder.c
+++ b/libgcab/gcab-folder.c
@@ -369,10 +369,9 @@ gcab_folder_extract (GCabFolder *self,
         g_object_unref (parent);
 
         out = g_file_replace (gfile, NULL, FALSE, 0, cancellable, error);
-        if (!out) {
-            g_object_unref (gfile);
+        g_object_unref (gfile);
+        if (!out)
             goto end;
-        }
 
         u4 usize = file->cfile.usize;
         u4 uoffset = file->cfile.uoffset;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]