# HG changeset patch # User Paul Aurich # Date 1239575156 0 # Node ID 4bac03b3c0fd4534ca5c6d00daf94e5cfe80ef4a # Parent 5d1140b0b10a5dcff909fe94a2749053e6c71743 Free the DNS query data before purple_url_parse() to avoid leaking on failure. diff -r 5d1140b0b10a -r 4bac03b3c0fd libpurple/protocols/yahoo/yahoo_filexfer.c --- a/libpurple/protocols/yahoo/yahoo_filexfer.c Sun Apr 12 22:23:34 2009 +0000 +++ b/libpurple/protocols/yahoo/yahoo_filexfer.c Sun Apr 12 22:25:56 2009 +0000 @@ -1029,12 +1029,7 @@ xd->port = YAHOO_XFER_RELAY_PORT; url = g_strdup_printf("%ld.%ld.%ld.%ld", d, c, b, a); - if (!purple_url_parse(url, &(xd->host), &(xd->port), &(xd->path), NULL, NULL)) { - purple_xfer_cancel_remote(xfer); - g_free(url); - return; - } - g_free(url); + /* Free the address... */ g_free(hosts->data); hosts = g_slist_remove(hosts, hosts->data); @@ -1048,6 +1043,13 @@ hosts = g_slist_remove(hosts, hosts->data); } + if (!purple_url_parse(url, &(xd->host), &(xd->port), &(xd->path), NULL, NULL)) { + purple_xfer_cancel_remote(xfer); + g_free(url); + return; + } + g_free(url); + pkt = yahoo_packet_new(YAHOO_SERVICE_FILETRANS_INFO_15, YAHOO_STATUS_AVAILABLE, yd->session_id); filename = g_path_get_basename(purple_xfer_get_local_filename(xfer));