From: Adam Dickmeiss Date: Wed, 20 Dec 2006 23:28:37 +0000 (+0000) Subject: Fix leaks which occurs for DNS failures X-Git-Tag: before.append.child~87 X-Git-Url: http://lists.indexdata.dk/?a=commitdiff_plain;h=ae9da79f55e37ed14df5e019daa415b0f18f7bff;p=pazpar2-moved-to-github.git Fix leaks which occurs for DNS failures --- diff --git a/src/pazpar2.c b/src/pazpar2.c index 8df9491..f903c6a 100644 --- a/src/pazpar2.c +++ b/src/pazpar2.c @@ -1,4 +1,4 @@ -/* $Id: pazpar2.c,v 1.2 2006-12-20 22:19:35 adam Exp $ */; +/* $Id: pazpar2.c,v 1.3 2006-12-20 23:28:37 adam Exp $ */; #include #include @@ -1021,6 +1021,8 @@ void load_simpletargets(const char *fn) if ((res = getaddrinfo(url, port, &hints, &addrinfo))) { yaz_log(YLOG_WARN, "Failed to resolve %s: %s", url, gai_strerror(res)); + xfree(host->hostport); + xfree(host); continue; } assert(addrinfo->ai_family == PF_INET);