gio: Replace g_clear_object() with if()…g_object_unref()
authorPhilip Withnall <philip.withnall@collabora.co.uk>
Thu, 28 Nov 2013 20:41:49 +0000 (20:41 +0000)
committerPhilip Withnall <philip.withnall@collabora.co.uk>
Thu, 28 Nov 2013 20:41:49 +0000 (20:41 +0000)
As per https://bugzilla.gnome.org/show_bug.cgi?id=113075#c39.

gio/gcontenttype.c
gio/gdbusserver.c

index 8734e7f..055df15 100644 (file)
@@ -1330,7 +1330,8 @@ matchlet_match (TreeMatchlet *matchlet,
             result = FALSE;
         }
 
-      g_clear_object (&info);
+      if (info)
+        g_object_unref (info);
       g_object_unref (file);
     }
   while (!result);
index 1016efb..e20f714 100644 (file)
@@ -898,7 +898,8 @@ try_tcp (GDBusServer  *server,
 
  out:
   g_list_free_full (resolved_addresses, g_object_unref);
-  g_clear_object (&resolver);
+  if (resolver)
+    g_object_unref (resolver);
   return ret;
 }