From 964263bb8d650f1681665c55704fb01a8e725621 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Thu, 3 Aug 2017 12:33:00 +0200 Subject: getaddrinfo: Release resolver context on error in gethosts [BZ #21885] --- sysdeps/posix/getaddrinfo.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sysdeps') diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c index efa7118..699411c 100644 --- a/sysdeps/posix/getaddrinfo.c +++ b/sysdeps/posix/getaddrinfo.c @@ -255,6 +255,8 @@ convert_hostent_to_gaih_addrtuple (const struct addrinfo *req, break; \ if (!scratch_buffer_grow (tmpbuf)) \ { \ + __resolv_context_enable_inet6 (res_ctx, res_enable_inet6); \ + __resolv_context_put (res_ctx); \ result = -EAI_MEMORY; \ goto free_and_return; \ } \ -- cgit v1.1