Skip to content

Commit

Permalink
Fix a few memory leaks
Browse files Browse the repository at this point in the history
  • Loading branch information
McKael committed Nov 5, 2015
1 parent 9947e42 commit 888ed7e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions loudmouth/lm-asyncns-resolver.c
Expand Up @@ -206,6 +206,7 @@ asyncns_resolver_lookup_host (LmResolver *resolver)

if (!asyncns_resolver_prep (resolver, NULL)) {
g_log (LM_LOG_DOMAIN, LM_LOG_LEVEL_NET, "Signal error\n");
g_free (host);
return;
}

Expand All @@ -218,6 +219,8 @@ asyncns_resolver_lookup_host (LmResolver *resolver)
asyncns_setuserdata (priv->asyncns_ctx,
priv->resolv_query,
(gpointer) asyncns_resolver_done);

g_free (host);
}

static void
Expand Down Expand Up @@ -300,6 +303,10 @@ asyncns_resolver_lookup_service (LmResolver *resolver)
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;
}

Expand Down

0 comments on commit 888ed7e

Please sign in to comment.