summaryrefslogtreecommitdiffstats
path: root/sys/dev/md
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/md')
-rw-r--r--sys/dev/md/md.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/dev/md/md.c b/sys/dev/md/md.c
index f9ef42d..a312425 100644
--- a/sys/dev/md/md.c
+++ b/sys/dev/md/md.c
@@ -892,6 +892,7 @@ mdcreate_vnode(struct md_ioctl *mdio, struct thread *td)
NDINIT(&nd, LOOKUP, FOLLOW, UIO_USERSPACE, mdio->md_file, td);
error = vn_open(&nd, &flags, 0, -1);
if (error) {
+ NDFREE(&nd, NDF_ONLY_PNBUF);
if (error != EACCES && error != EPERM && error != EROFS)
return (error);
flags &= ~FWRITE;
OpenPOWER on IntegriCloud