Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP1:Update
glibc
nss-dns-memleak-2.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File nss-dns-memleak-2.patch of Package glibc
Index: glibc-2.19/resolv/nss_dns/dns-host.c =================================================================== --- glibc-2.19.orig/resolv/nss_dns/dns-host.c +++ glibc-2.19/resolv/nss_dns/dns-host.c @@ -315,7 +315,11 @@ _nss_dns_gethostbyname4_r (const char *n int n = __libc_res_nsearch (&_res, name, C_IN, T_UNSPEC, host_buffer.buf->buf, 2048, &host_buffer.ptr, &ans2p, &nans2p, &resplen2, &ans2p_malloced); - if (n < 0) + if (n >= 0) + status = gaih_getanswer(host_buffer.buf, n, (const querybuf *) ans2p, + resplen2, name, pat, buffer, buflen, + errnop, herrnop, ttlp); + else { switch (errno) { @@ -342,17 +346,8 @@ _nss_dns_gethostbyname4_r (const char *n *errnop = EAGAIN; else __set_errno (olderr); - - if (host_buffer.buf != orig_host_buffer) - free (host_buffer.buf); - - return status; } - status = gaih_getanswer(host_buffer.buf, n, (const querybuf *) ans2p, - resplen2, name, pat, buffer, buflen, - errnop, herrnop, ttlp); - /* Check whether ans2p was separately allocated. */ if (ans2p_malloced) free (ans2p);
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor