summaryrefslogtreecommitdiff
path: root/nis/nss_compat/compat-grp.c
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@suse.de>2015-03-25 16:35:46 +0100
committerAndreas Schwab <schwab@suse.de>2015-05-11 10:41:49 +0200
commitb13b96ca05a132a12dc5f3712b99e626670716bf (patch)
tree2b1ab6395ec3b6e44c63513858e2c53383747733 /nis/nss_compat/compat-grp.c
parente1b6cb04f5efff7fb7415c69511d3ab3c31c6e4a (diff)
downloadglibc-b13b96ca05a132a12dc5f3712b99e626670716bf.tar.gz
Separate internal state between getXXent and getXXbyYY NSS calls (bug 18007)
Diffstat (limited to 'nis/nss_compat/compat-grp.c')
-rw-r--r--nis/nss_compat/compat-grp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/nis/nss_compat/compat-grp.c b/nis/nss_compat/compat-grp.c
index 5e9c527964..d8ef4be63b 100644
--- a/nis/nss_compat/compat-grp.c
+++ b/nis/nss_compat/compat-grp.c
@@ -194,9 +194,6 @@ _nss_compat_setgrent (int stayopen)
static enum nss_status
internal_endgrent (ent_t *ent)
{
- if (nss_endgrent)
- nss_endgrent ();
-
if (ent->stream != NULL)
{
fclose (ent->stream);
@@ -222,6 +219,9 @@ _nss_compat_endgrent (void)
__libc_lock_lock (lock);
+ if (nss_endgrent)
+ nss_endgrent ();
+
result = internal_endgrent (&ext_ent);
__libc_lock_unlock (lock);