aboutsummaryrefslogtreecommitdiff
path: root/nss
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@gmail.com>2011-06-21 17:09:44 -0400
committerUlrich Drepper <drepper@gmail.com>2011-06-21 17:09:44 -0400
commit51f9aa6a1ed763cb133fff2efddfbf564a82a528 (patch)
treec89383f9bfcf26d68204ce982d70fde93d695d65 /nss
parentc0244a9dedce43a4b950d91451b16a7cf5408476 (diff)
downloadglibc-51f9aa6a1ed763cb133fff2efddfbf564a82a528.zip
glibc-51f9aa6a1ed763cb133fff2efddfbf564a82a528.tar.gz
glibc-51f9aa6a1ed763cb133fff2efddfbf564a82a528.tar.bz2
Fix crash in unsuccessful uses of nss_db
Diffstat (limited to 'nss')
-rw-r--r--nss/nss_db/db-XXX.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/nss/nss_db/db-XXX.c b/nss/nss_db/db-XXX.c
index 3947893..0600e38 100644
--- a/nss/nss_db/db-XXX.c
+++ b/nss/nss_db/db-XXX.c
@@ -71,11 +71,14 @@ CONCAT(_nss_db_set,ENTNAME) (int stayopen)
status = internal_setent (DBFILE, &state);
- /* Remember STAYOPEN flag. */
if (status == NSS_STATUS_SUCCESS)
- keep_db |= stayopen;
- /* Reset the sequential index. */
- entidx = (const char *) state.header + state.header->valstroffset;
+ {
+ /* Remember STAYOPEN flag. */
+ keep_db |= stayopen;
+
+ /* Reset the sequential index. */
+ entidx = (const char *) state.header + state.header->valstroffset;
+ }
__libc_lock_unlock (lock);