diff options
author | Andreas Schwab <schwab@suse.de> | 2015-03-25 16:35:46 +0100 |
---|---|---|
committer | Andreas Schwab <schwab@suse.de> | 2015-05-11 10:41:49 +0200 |
commit | b13b96ca05a132a12dc5f3712b99e626670716bf (patch) | |
tree | 2b1ab6395ec3b6e44c63513858e2c53383747733 /nis/nss_compat/compat-grp.c | |
parent | e1b6cb04f5efff7fb7415c69511d3ab3c31c6e4a (diff) | |
download | glibc-b13b96ca05a132a12dc5f3712b99e626670716bf.zip glibc-b13b96ca05a132a12dc5f3712b99e626670716bf.tar.gz glibc-b13b96ca05a132a12dc5f3712b99e626670716bf.tar.bz2 |
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.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/nis/nss_compat/compat-grp.c b/nis/nss_compat/compat-grp.c index 5e9c527..d8ef4be 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); |