vfs: add missing pwd_drop on error in namei_setup

Reported by:	pho
This commit is contained in:
Mateusz Guzik 2020-08-13 10:24:45 +00:00
parent cf51899564
commit b38ad2683a

View File

@ -431,6 +431,7 @@ namei_setup(struct nameidata *ndp, struct vnode **dpp, struct pwd **pwdp)
if (error != 0) {
if (*dpp != NULL)
vrele(*dpp);
pwd_drop(pwd);
return (error);
}
MPASS((ndp->ni_lcf & (NI_LCF_BENEATH_ABS | NI_LCF_LATCH)) !=