[gcab] trivial: Remove any checked-gfrees



commit 578b5c0a75bfbddfb7665f142d3c6001ae9e12c5
Author: Richard Hughes <richard hughsie com>
Date:   Thu Nov 16 21:02:17 2017 +0000

    trivial: Remove any checked-gfrees
    
    Reviewed-by: Marc-André Lureau <marcandre lureau redhat com>

 libgcab/cabinet.c     |    3 +--
 libgcab/gcab-folder.c |    3 +--
 2 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/libgcab/cabinet.c b/libgcab/cabinet.c
index 56c333d..9361372 100644
--- a/libgcab/cabinet.c
+++ b/libgcab/cabinet.c
@@ -11,8 +11,7 @@ zalloc (voidpf opaque, uInt items, uInt size)
 static void
 zfree (voidpf opaque, voidpf address)
 {
-    if (address)
-        g_free (address);
+    g_free (address);
 }
 
 static gboolean
diff --git a/libgcab/gcab-folder.c b/libgcab/gcab-folder.c
index 631113f..db28cf7 100644
--- a/libgcab/gcab-folder.c
+++ b/libgcab/gcab-folder.c
@@ -442,8 +442,7 @@ gcab_folder_extract (GCabFolder *self,
     success = TRUE;
 
 end:
-    if (files)
-        g_slist_free (files);
+    g_slist_free (files);
 
     g_clear_object (&data);
     g_clear_object (&out);


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