changeset 28668:213a3449bb3c

merge of 'ad95721f47b1dcb2d2e5c50c91701526fc4fd67f' and 'd3c619bb9b8fa811713cff87318d618e1c82de83'
author Mark Doliner <mark@kingant.net>
date Mon, 28 Sep 2009 06:44:46 +0000
parents 160b864e3d9b (current diff) 4c58aa4aacb0 (diff)
children 67a97fca157c
files libpurple/dnsquery.c
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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));