Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 4 Jul 2023 03:20:10 GMT
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: d6b900c915c1 - main - vn_path_to_global_path_hardlink(): avoid freeing non-initialized pointer
Message-ID:  <202307040320.3643KAJR014345@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by kib:

URL: https://cgit.FreeBSD.org/src/commit/?id=d6b900c915c19ac1bb5d57659695fd143864be66

commit d6b900c915c19ac1bb5d57659695fd143864be66
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2023-07-03 17:22:33 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2023-07-04 03:19:47 +0000

    vn_path_to_global_path_hardlink(): avoid freeing non-initialized pointer
    
    Reported by:    pho
    Sponsored by:   The FreeBSD Foundation
    MFC after:      1 week
---
 sys/kern/vfs_cache.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c
index 09a93c8303b2..25918f5a0b6e 100644
--- a/sys/kern/vfs_cache.c
+++ b/sys/kern/vfs_cache.c
@@ -3866,7 +3866,7 @@ vn_path_to_global_path_hardlink(struct thread *td, struct vnode *vp,
 
 	if (error != 0) {
 		vrele(vp);
-		goto out;
+		return (error);
 	}
 
 	if (strlen(rpath) >= pathlen) {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202307040320.3643KAJR014345>