vfs: add missing pwd_drop on error in namei_setup
Reported by: pho
This commit is contained in:
parent
cf51899564
commit
b38ad2683a
@ -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)) !=
|
||||
|
Loading…
Reference in New Issue
Block a user