vfs: fixup parse_mount_dev_present after 5b5b7e2ca2

Reported by:	kib
This commit is contained in:
Mateusz Guzik 2022-09-17 10:35:00 +00:00
parent 5b5b7e2ca2
commit aede6a9670

View File

@ -726,9 +726,10 @@ parse_mount_dev_present(const char *dev)
NDINIT(&nd, LOOKUP, FOLLOW | LOCKLEAF, UIO_SYSSPACE, dev);
error = namei(&nd);
if (!error)
if (!error) {
vput(nd.ni_vp);
NDFREE_PNBUF(&nd);
NDFREE_PNBUF(&nd);
}
return (error != 0) ? 0 : 1;
}