[glib] gio: Replace g_clear_object() with if( )…g_object_unref()
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] gio: Replace g_clear_object() with if( )…g_object_unref()
- Date: Thu, 28 Nov 2013 20:42:28 +0000 (UTC)
commit 49ea52e6a69d96bd3eb29ed26c6cb1de592d336f
Author: Philip Withnall <philip withnall collabora co uk>
Date: Thu Nov 28 20:41:49 2013 +0000
gio: Replace g_clear_object() with if()…g_object_unref()
As per https://bugzilla.gnome.org/show_bug.cgi?id=113075#c39.
gio/gcontenttype.c | 3 ++-
gio/gdbusserver.c | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/gio/gcontenttype.c b/gio/gcontenttype.c
index 8734e7f..055df15 100644
--- a/gio/gcontenttype.c
+++ b/gio/gcontenttype.c
@@ -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);
diff --git a/gio/gdbusserver.c b/gio/gdbusserver.c
index 1016efb..e20f714 100644
--- a/gio/gdbusserver.c
+++ b/gio/gdbusserver.c
@@ -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;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]