mirror of
git://sourceware.org/git/glibc.git
synced 2025-04-06 14:10:30 +08:00
nss: Call __resolv_context_put before early return in get*_r [BZ #21932]
This corrects an oversight introduced in commit 352f4ff9a268b81ef5d4b2413f582565806e4790 (resolv: Introduce struct resolv_context).
This commit is contained in:
parent
756d169989
commit
3016149819
@ -1,3 +1,9 @@
|
||||
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-09 Andreas Schwab <schwab@suse.de>
|
||||
|
||||
[BZ #21041]
|
||||
|
@ -234,6 +234,9 @@ INTERNAL (REENTRANT_NAME) (ADD_PARAMS, LOOKUP_TYPE *resbuf, char *buffer,
|
||||
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, LOOKUP_TYPE *resbuf, char *buffer,
|
||||
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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user