[PATCH v2 spice-gtk 1/5] spice-channel: plug a small memory leak

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

 



---
 gtk/spice-channel.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/gtk/spice-channel.c b/gtk/spice-channel.c
index 264d1f2..052ffce 100644
--- a/gtk/spice-channel.c
+++ b/gtk/spice-channel.c
@@ -1353,6 +1353,7 @@ static gboolean spice_channel_perform_auth_sasl(SpiceChannel *channel)
          g_socket_address_get_family(addr) == G_SOCKET_FAMILY_IPV6) &&
         (localAddr = addr_to_string(addr)) == NULL)
         goto error;
+    g_object_unref(addr);
 
     /* Get remote address in form  IPADDR:PORT */
     addr = g_socket_get_remote_address(c->sock, NULL);
@@ -1364,6 +1365,7 @@ static gboolean spice_channel_perform_auth_sasl(SpiceChannel *channel)
          g_socket_address_get_family(addr) == G_SOCKET_FAMILY_IPV6) &&
         (remoteAddr = addr_to_string(addr)) == NULL)
         goto error;
+    g_object_unref(addr);
 
     CHANNEL_DEBUG(channel, "Client SASL new host:'%s' local:'%s' remote:'%s'",
                   spice_session_get_host(c->session), localAddr, remoteAddr);
-- 
1.8.1.rc1.17.g75ed918

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]