From ae9da79f55e37ed14df5e019daa415b0f18f7bff Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Wed, 20 Dec 2006 23:28:37 +0000 Subject: [PATCH 1/1] Fix leaks which occurs for DNS failures --- src/pazpar2.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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); -- 1.7.10.4