Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/kern Fix (harmless) uninitialized variable. In the path



details:   https://anonhg.NetBSD.org/src/rev/afe31df9acc4
branches:  trunk
changeset: 962230:afe31df9acc4
user:      maxv <maxv%NetBSD.org@localhost>
date:      Sat Jul 06 14:27:38 2019 +0000

description:
Fix (harmless) uninitialized variable. In the path

        namei_tryemulroot -> namei_oneroot-> namei_start

There was a branch where 'ndp->ni_erootdir' was not initialized.

diffstat:

 sys/kern/vfs_lookup.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (26 lines):

diff -r f8a8f40355fb -r afe31df9acc4 sys/kern/vfs_lookup.c
--- a/sys/kern/vfs_lookup.c     Sat Jul 06 12:58:58 2019 +0000
+++ b/sys/kern/vfs_lookup.c     Sat Jul 06 14:27:38 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vfs_lookup.c,v 1.210 2019/03/17 10:14:52 hannken Exp $ */
+/*     $NetBSD: vfs_lookup.c,v 1.211 2019/07/06 14:27:38 maxv Exp $    */
 
 /*
  * Copyright (c) 1982, 1986, 1989, 1993
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vfs_lookup.c,v 1.210 2019/03/17 10:14:52 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_lookup.c,v 1.211 2019/07/06 14:27:38 maxv Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_magiclinks.h"
@@ -678,6 +678,7 @@
         * POSIX.1 requirement: "" is not a valid file name.
         */
        if (ndp->ni_pathlen == 1) {
+               ndp->ni_erootdir = NULL;
                return ENOENT;
        }
 



Home | Main Index | Thread Index | Old Index