# HG changeset patch # User Mikael Berthe # Date 1446739895 -3600 # Node ID 88c6aef5ff18d39ed2d52bc6306deee3291b28f1 # Parent e1883e3f9a5573ed0f3960d8e5ad842d3f5535af Fix a few memory leaks diff -r e1883e3f9a55 -r 88c6aef5ff18 loudmouth/lm-asyncns-resolver.c --- a/loudmouth/lm-asyncns-resolver.c Thu Nov 05 13:39:41 2015 +0100 +++ b/loudmouth/lm-asyncns-resolver.c Thu Nov 05 17:11:35 2015 +0100 @@ -206,6 +206,7 @@ if (!asyncns_resolver_prep (resolver, NULL)) { g_log (LM_LOG_DOMAIN, LM_LOG_LEVEL_NET, "Signal error\n"); + g_free (host); return; } @@ -218,6 +219,8 @@ asyncns_setuserdata (priv->asyncns_ctx, priv->resolv_query, (gpointer) asyncns_resolver_done); + + g_free (host); } static void @@ -300,6 +303,10 @@ g_log (LM_LOG_DOMAIN, LM_LOG_LEVEL_NET, "Failed to initiate the asyncns library"); /* FIXME: Signal error */ + g_free (srv); + g_free (domain); + g_free (service); + g_free (protocol); return; }