From c729f416fb07e723a8404e28241a8096ac438838 Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Tue, 26 Nov 2013 11:08:50 +0000 Subject: [PATCH] gdbusserver: Fix a potential g_object_unref(NULL) call MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gio/gdbusserver.c b/gio/gdbusserver.c index 30df5cb66..1016efbd2 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; } -- 2.34.1