trivial: fix leak in hostname reverse-lookup code

g_inet_address_to_string() returns an allocated value.
This commit is contained in:
Dan Williams 2013-11-25 15:18:02 -06:00
parent c1768154c4
commit b82dd151b2

View file

@ -1939,8 +1939,10 @@ dns_config_changed (NMDnsManager *dns_manager, gpointer user_data)
/* Re-start the hostname lookup thread if we don't have hostname yet. */
if (priv->lookup_addr) {
nm_log_dbg (LOGD_DNS, "restarting reverse-lookup thread for address %s'",
g_inet_address_to_string (priv->lookup_addr));
char *str = g_inet_address_to_string (priv->lookup_addr);
nm_log_dbg (LOGD_DNS, "restarting reverse-lookup thread for address %s", str);
g_free (str);
priv->lookup_cancellable = g_cancellable_new ();
g_resolver_lookup_by_address_async (priv->resolver,