summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpfg <pfg@FreeBSD.org>2015-03-06 22:22:57 +0000
committerpfg <pfg@FreeBSD.org>2015-03-06 22:22:57 +0000
commit816f612e0ae6aa77bca87a05cea4769b1b3637f3 (patch)
tree1ea4e1c7e86635bc291c3ccd1bbfa117013261ed
parentad0d8bd396b3235c78e3518f5ec5e2a2759f4004 (diff)
downloadFreeBSD-src-816f612e0ae6aa77bca87a05cea4769b1b3637f3.zip
FreeBSD-src-816f612e0ae6aa77bca87a05cea4769b1b3637f3.tar.gz
compat_passwd(): yet another uninitialized access to stayopen.
CID: 1018731
-rw-r--r--lib/libc/gen/getpwent.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libc/gen/getpwent.c b/lib/libc/gen/getpwent.c
index 0cb8ed2..09a6247 100644
--- a/lib/libc/gen/getpwent.c
+++ b/lib/libc/gen/getpwent.c
@@ -1942,7 +1942,7 @@ docompat:
break;
}
fin:
- if (!stayopen && st->db != NULL) {
+ if (st->db != NULL && !stayopen) {
(void)st->db->close(st->db);
st->db = NULL;
}
OpenPOWER on IntegriCloud