[Spice-devel] [spice-gtk] session: Fix 'g_proxy_address_new' memory leak

Christophe Fergeau cfergeau at redhat.com
Fri Feb 6 08:45:30 PST 2015


The address returned by g_proxy_address_new must be unref'ed when no
longer needed.
---
 gtk/spice-session.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/gtk/spice-session.c b/gtk/spice-session.c
index 8de48e5..1228edb 100644
--- a/gtk/spice-session.c
+++ b/gtk/spice-session.c
@@ -1979,6 +1979,7 @@ static void proxy_lookup_ready(GObject *source_object, GAsyncResult *result,
 
     open_host_connectable_connect(open_host, G_SOCKET_CONNECTABLE(address));
     g_resolver_free_addresses(addresses);
+    g_object_unref(address);
 }
 
 /* main context */
-- 
2.1.0



More information about the Spice-devel mailing list