[glib] gdbusserver: Fix a potential g_object_unref(NULL) call
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] gdbusserver: Fix a potential g_object_unref(NULL) call
- Date: Wed, 27 Nov 2013 10:02:11 +0000 (UTC)
commit c729f416fb07e723a8404e28241a8096ac438838
Author: Philip Withnall <philip withnall collabora co uk>
Date: Tue Nov 26 11:08:50 2013 +0000
gdbusserver: Fix a potential g_object_unref(NULL) call
This can happen if the hash table lookup for ‘noncefile’ fails, and
hence the first ‘goto out’ is hit, at which point resolver is still
NULL.
Found with scan-build.
https://bugzilla.gnome.org/show_bug.cgi?id=113075
gio/gdbusserver.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gio/gdbusserver.c b/gio/gdbusserver.c
index 30df5cb..1016efb 100644
--- a/gio/gdbusserver.c
+++ b/gio/gdbusserver.c
@@ -898,7 +898,7 @@ try_tcp (GDBusServer *server,
out:
g_list_free_full (resolved_addresses, g_object_unref);
- g_object_unref (resolver);
+ g_clear_object (&resolver);
return ret;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]