--- a/libpurple/dnsquery.c Mon Sep 28 02:30:09 2009 +0000 +++ b/libpurple/dnsquery.c Mon Sep 28 06:44:46 2009 +0000 @@ -328,6 +328,8 @@ printf("dns[%d] Error: getaddrinfo returned %d\n", getpid(), rc); dns_params.hostname[0] = '\0'; + g_free(hostname); + hostname = NULL; continue; } tmp = res; @@ -948,6 +950,7 @@ g_snprintf(message, sizeof(message), _("Error resolving %s: %d"), query_data->hostname, h_errno); purple_dnsquery_failed(query_data, message); + g_free(hostname); return FALSE; } memset(&sin, 0, sizeof(struct sockaddr_in));