vn_path_to_global_path_hardlink(): avoid freeing non-initialized pointer

Reported by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
This commit is contained in:
Konstantin Belousov 2023-07-03 20:22:33 +03:00
parent 4456846a1a
commit d6b900c915

View file

@ -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) {