libpurple/dnsquery.c

changeset 28592
00498f7596fd
parent 28590
b0bc7df691c5
parent 28591
f943daaf368e
child 28784
0344b94dba21
child 29520
42260125c2be
--- 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));

mercurial