diff options
author | Andreas Schwab <schwab@suse.de> | 2014-02-18 10:57:25 +0100 |
---|---|---|
committer | Andreas Schwab <schwab@suse.de> | 2014-02-19 14:39:21 +0100 |
commit | ab09bf616ad527b249aca5f2a4956fd526f0712f (patch) | |
tree | 8983f676bf5ac2c5e418a4276dcd25f28755ea70 /resolv/nss_dns/dns-canon.c | |
parent | c6af2d896ce07740ad5170eaed3c0bb7720e079e (diff) | |
download | glibc-ab09bf616ad527b249aca5f2a4956fd526f0712f.tar.gz glibc-ab09bf616ad527b249aca5f2a4956fd526f0712f.tar.xz glibc-ab09bf616ad527b249aca5f2a4956fd526f0712f.zip |
Properly fix memory leak in _nss_dns_gethostbyname4_r with big DNS answer
Instead of trying to guess whether the second buffer needs to be freed set a flag at the place it is allocated
Diffstat (limited to 'resolv/nss_dns/dns-canon.c')
-rw-r--r-- | resolv/nss_dns/dns-canon.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/resolv/nss_dns/dns-canon.c b/resolv/nss_dns/dns-canon.c index a9db232c7b..e8c112c389 100644 --- a/resolv/nss_dns/dns-canon.c +++ b/resolv/nss_dns/dns-canon.c @@ -62,7 +62,7 @@ _nss_dns_getcanonname_r (const char *name, char *buffer, size_t buflen, { int r = __libc_res_nquery (&_res, name, ns_c_in, qtypes[i], buf, sizeof (buf), &ansp.ptr, NULL, NULL, - NULL); + NULL, NULL); if (r > 0) { /* We need to decode the response. Just one question record. |