pidgin: d3c619bb: Minor leak fixes. Probably not too impor...

qulogic at pidgin.im qulogic at pidgin.im
Sun Sep 27 23:31:00 EDT 2009


-----------------------------------------------------------------
Revision: d3c619bb9b8fa811713cff87318d618e1c82de83
Ancestor: bd59b6d44034a232a0414586f78d8f559d9705f8
Author: qulogic at pidgin.im
Date: 2009-09-28T01:54:43
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/d3c619bb9b8fa811713cff87318d618e1c82de83

Modified files:
        libpurple/dnsquery.c

ChangeLog: 

Minor leak fixes. Probably not too important since they're in DNS resolver
child processes.

-------------- next part --------------
============================================================
--- libpurple/dnsquery.c	be44ed4ded20b86f084e483193f56bad11f0b710
+++ libpurple/dnsquery.c	aa50ffe3bfe88e1ea1bac3183d8d67989f024423
@@ -328,6 +328,8 @@ purple_dnsquery_resolver_run(int child_o
 				printf("dns[%d] Error: getaddrinfo returned %d\n",
 					getpid(), rc);
 			dns_params.hostname[0] = '\0';
+			g_free(hostname);
+			hostname = NULL;
 			continue;
 		}
 		tmp = res;
@@ -951,6 +953,7 @@ resolve_host(gpointer data)
 			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));


More information about the Commits mailing list