From b3d078e66658bc68dda915bb6a786e2f07d2483d Mon Sep 17 00:00:00 2001 From: "Pedro F. Giffuni" Date: Fri, 6 Mar 2015 22:22:57 +0000 Subject: [PATCH] compat_passwd(): yet another uninitialized access to stayopen. CID: 1018731 --- lib/libc/gen/getpwent.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libc/gen/getpwent.c b/lib/libc/gen/getpwent.c index 0cb8ed227f8..09a624785a1 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; }