SHA256
1
0
forked from pool/glibc
glibc/resolv-context-leak.patch
Andreas Schwab f869647ca8 Accepting request 519281 from home:Andreas_Schwab:Factory
- math-c++-compat.patch: Do not use __builtin_types_compatible_p in C++
  mode (BZ #21930)

- Add iconvconfig to baselibs.conf (bsc#1051042)

- resolv-context-leak.patch: Fix leaks of resolver contexts
- dl-runtime-resolve-opt-avx512f.patch: Use _dl_runtime_resolve_opt only
  with AVX512F (BZ #21871)
- libpthread-compat-wrappers.patch: Don't use IFUNC resolver for longjmp
  or system in libpthread (BZ #21041)

OBS-URL: https://build.opensuse.org/request/show/519281
OBS-URL: https://build.opensuse.org/package/show/Base:System/glibc?expand=0&rev=472
2017-08-29 08:02:22 +00:00

54 lines
1.6 KiB
Diff

2017-08-09 Florian Weimer <fweimer@redhat.com>
[BZ #21932]
* nss/getXXbyYY_r.c (REENTRANT_NAME): Call __resolv_context_put
before early return.
2017-08-03 Florian Weimer <fweimer@redhat.com>
[BZ #21885]
* sysdeps/posix/getaddrinfo.c (gethosts): Release resolver context
on memory allocation failure.
Index: glibc-2.26/nss/getXXbyYY_r.c
===================================================================
--- glibc-2.26.orig/nss/getXXbyYY_r.c
+++ glibc-2.26/nss/getXXbyYY_r.c
@@ -234,6 +234,9 @@ INTERNAL (REENTRANT_NAME) (ADD_PARAMS, L
H_ERRNO_VAR_P))
{
case -1:
+# ifdef NEED__RES
+ __resolv_context_put (res_ctx);
+# endif
return errno;
case 1:
#ifdef NEED_H_ERRNO
@@ -253,7 +256,12 @@ INTERNAL (REENTRANT_NAME) (ADD_PARAMS, L
nscd_status = NSCD_NAME (ADD_VARIABLES, resbuf, buffer, buflen, result
H_ERRNO_VAR);
if (nscd_status >= 0)
- return nscd_status;
+ {
+# ifdef NEED__RES
+ __resolv_context_put (res_ctx);
+# endif
+ return nscd_status;
+ }
}
#endif
Index: glibc-2.26/sysdeps/posix/getaddrinfo.c
===================================================================
--- glibc-2.26.orig/sysdeps/posix/getaddrinfo.c
+++ glibc-2.26/sysdeps/posix/getaddrinfo.c
@@ -255,6 +255,8 @@ convert_hostent_to_gaih_addrtuple (const
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; \
} \