[gtk+] Fixed some object leaks in broadway_server_new() constructor.



commit 76da8a5f208f8be67b460714a9186bb3a01d63bb
Author: Domenico Tortorella <dom tortorella gmail com>
Date:   Thu Aug 14 13:08:10 2014 +0200

    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 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/gdk/broadway/broadway-server.c b/gdk/broadway/broadway-server.c
index 2964a77..5f78f40 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);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]