[PATCH] soup-socket: fixed leak in new_socket_client()
- From: Slava Monich <slava monich com>
- To: libsoup-list gnome org
- Subject: [PATCH] soup-socket: fixed leak in new_socket_client()
- Date: Tue, 11 Feb 2014 15:30:59 +0200
---
libsoup/soup-socket.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/libsoup/soup-socket.c b/libsoup/soup-socket.c
index e0748fd..b9f1dfc 100644
--- a/libsoup/soup-socket.c
+++ b/libsoup/soup-socket.c
@@ -715,8 +715,13 @@ new_socket_client (SoupSocket *sock)
if (priv->timeout)
g_socket_client_set_timeout (client, priv->timeout);
- if (priv->local_addr)
- g_socket_client_set_local_address (client, soup_address_get_gsockaddr (priv->local_addr));
+ if (priv->local_addr) {
+ GSocketAddress *addr;
+
+ addr = soup_address_get_gsockaddr (priv->local_addr);
+ g_socket_client_set_local_address (client, addr);
+ g_object_unref (addr);
+ }
return client;
}
--
1.8.3.2
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]