[telepathy-gabble/master] Fail early if we can't get local ip address to prevent leaking memory
Sjoerd Simons
sjoerd.simons at collabora.co.uk
Fri Dec 18 06:10:46 PST 2009
---
src/bytestream-socks5.c | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/src/bytestream-socks5.c b/src/bytestream-socks5.c
index db7b60b..606526c 100644
--- a/src/bytestream-socks5.c
+++ b/src/bytestream-socks5.c
@@ -1816,6 +1816,13 @@ gabble_bytestream_socks5_initiate (GabbleBytestreamIface *iface)
return FALSE;
}
+ ips = get_local_interfaces_ips ();
+ if (ips == NULL)
+ {
+ DEBUG ("Can't get IP addresses");
+ return FALSE;
+ }
+
g_assert (priv->listener == NULL);
priv->listener = gibber_listener_new ();
@@ -1839,13 +1846,6 @@ gabble_bytestream_socks5_initiate (GabbleBytestreamIface *iface)
'@', "mode", "tcp",
')', NULL);
- ips = get_local_interfaces_ips ();
- if (ips == NULL)
- {
- DEBUG ("Can't get IP addresses");
- return FALSE;
- }
-
for (ip = ips; ip != NULL; ip = g_slist_next (ip))
{
LmMessageNode *node;
--
1.5.6.5
More information about the telepathy-commits
mailing list