From 76da8a5f208f8be67b460714a9186bb3a01d63bb Mon Sep 17 00:00:00 2001 From: Domenico Tortorella Date: Thu, 14 Aug 2014 13:08:10 +0200 Subject: [PATCH] Fixed some object leaks in broadway_server_new() constructor. https://bugzilla.gnome.org/show_bug.cgi?id=734778 --- gdk/broadway/broadway-server.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gdk/broadway/broadway-server.c b/gdk/broadway/broadway-server.c index 2964a770ab..5f78f400a8 100644 --- a/gdk/broadway/broadway-server.c +++ b/gdk/broadway/broadway-server.c @@ -1240,6 +1240,7 @@ broadway_server_new (char *address, int port, GError **error) error)) { g_prefix_error (error, "Unable to listen to port %d: ", server->port); + g_object_unref (server); return NULL; } } @@ -1249,6 +1250,7 @@ broadway_server_new (char *address, int port, GError **error) if (inet_address == NULL) { g_set_error (error, G_IO_ERROR, G_IO_ERROR_INVALID_DATA, "Invalid ip address %s: ", address); + g_object_unref (server); return NULL; } socket_address = g_inet_socket_address_new (inet_address, port); @@ -1263,6 +1265,7 @@ broadway_server_new (char *address, int port, GError **error) { g_prefix_error (error, "Unable to listen to %s:%d: ", server->address, server->port); g_object_unref (socket_address); + g_object_unref (server); return NULL; } g_object_unref (socket_address);