Grr. Backout previous change. vn_open_cred() will call NDFREE() on failure.
This commit is contained in:
parent
970c7ca2ef
commit
f220f7afa6
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=154903
@ -354,10 +354,10 @@ alq_open(struct alq **alqp, const char *file, struct ucred *cred, int cmode,
|
||||
flags = FWRITE | O_NOFOLLOW | O_CREAT;
|
||||
|
||||
error = vn_open_cred(&nd, &flags, cmode, cred, -1);
|
||||
NDFREE(&nd, NDF_ONLY_PNBUF);
|
||||
if (error)
|
||||
return (error);
|
||||
|
||||
NDFREE(&nd, NDF_ONLY_PNBUF);
|
||||
/* We just unlock so we hold a reference */
|
||||
VOP_UNLOCK(nd.ni_vp, 0, td);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user