SHA256
1
0
forked from pool/glibc
glibc/resolv-mem-leak.patch
Andreas Schwab 5f9962d8aa Accepting request 345159 from home:Andreas_Schwab:Factory
- resolv-mem-leak.patch: Fix resource leak in resolver (BZ #19257)
- tzset-tzname.patch: Force rereading TZDEFRULES after it was used to set
  DST rules only (BZ #19253)

- glibc-2.3.90-noversion.diff: use stat64

- ld-pointer-guard.patch: Always enable pointer guard (bsc#950944, BZ
  #18928)

OBS-URL: https://build.opensuse.org/request/show/345159
OBS-URL: https://build.opensuse.org/package/show/Base:System/glibc?expand=0&rev=419
2015-11-19 09:31:48 +00:00

22 lines
771 B
Diff

Fix resource leak in resolver (bug 19257)
* resolv/res_init.c (__res_iclose): Use statp->nscount instead of
statp->_u._ext.nscount as loop count.
---
resolv/res_init.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: glibc-2.22/resolv/res_init.c
===================================================================
--- glibc-2.22.orig/resolv/res_init.c
+++ glibc-2.22/resolv/res_init.c
@@ -593,7 +593,7 @@ __res_iclose(res_state statp, bool free_
statp->_vcsock = -1;
statp->_flags &= ~(RES_F_VC | RES_F_CONN);
}
- for (ns = 0; ns < statp->_u._ext.nscount; ns++)
+ for (ns = 0; ns < statp->nscount; ns++)
if (statp->_u._ext.nsaddrs[ns]) {
if (statp->_u._ext.nssocks[ns] != -1) {
close_not_cancel_no_status(statp->_u._ext.nssocks[ns]);