Author: pfg
Date: Fri Mar  6 22:22:57 2015
New Revision: 279712
URL: https://svnweb.freebsd.org/changeset/base/279712

Log:
  compat_passwd(): yet another uninitialized access to stayopen.
  
  CID:  1018731

Modified:
  head/lib/libc/gen/getpwent.c

Modified: head/lib/libc/gen/getpwent.c
==============================================================================
--- head/lib/libc/gen/getpwent.c        Fri Mar  6 22:10:42 2015        
(r279711)
+++ head/lib/libc/gen/getpwent.c        Fri Mar  6 22:22:57 2015        
(r279712)
@@ -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;
        }
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"

Reply via email to