From 42edf30b88986a29cbbc811efea10084efe2f2f7 Mon Sep 17 00:00:00 2001 From: Jonny Lamb Date: Thu, 24 Mar 2011 11:34:20 +0000 Subject: bytestream-oob: ensure we free the socket address in an error Signed-off-by: Jonny Lamb --- lib/gibber/gibber-bytestream-oob.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/gibber/gibber-bytestream-oob.c b/lib/gibber/gibber-bytestream-oob.c index f9238772..440ae4a7 100644 --- a/lib/gibber/gibber-bytestream-oob.c +++ b/lib/gibber/gibber-bytestream-oob.c @@ -305,8 +305,6 @@ connect_to_url (GibberBytestreamOOB *self) goto out; } - g_object_unref (socket_address); - addr.in.sin_port = g_htons ((guint16) portnum); ll_transport = gibber_ll_transport_new (); @@ -315,6 +313,9 @@ connect_to_url (GibberBytestreamOOB *self) g_object_unref (ll_transport); out: + if (socket_address != NULL) + g_object_unref (socket_address); + g_strfreev (tokens); } -- cgit v1.2.1