summaryrefslogtreecommitdiffstats
path: root/sys/dev/md
diff options
context:
space:
mode:
authorpjd <pjd@FreeBSD.org>2004-09-14 19:55:07 +0000
committerpjd <pjd@FreeBSD.org>2004-09-14 19:55:07 +0000
commite32c315aa757c4a2a64946f8bae894243e147542 (patch)
treeff004f5925f0d08f349d30892d2064e92979aacb /sys/dev/md
parent4e7ebd879c74920fc2eefaf660838f2a340595d8 (diff)
downloadFreeBSD-src-e32c315aa757c4a2a64946f8bae894243e147542.zip
FreeBSD-src-e32c315aa757c4a2a64946f8bae894243e147542.tar.gz
Deallocate VM object on failure.
Diffstat (limited to 'sys/dev/md')
-rw-r--r--sys/dev/md/md.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/dev/md/md.c b/sys/dev/md/md.c
index a312425..6b46e4b 100644
--- a/sys/dev/md/md.c
+++ b/sys/dev/md/md.c
@@ -1057,6 +1057,8 @@ mdcreate_swap(struct md_ioctl *mdio, struct thread *td)
}
error = mdsetcred(sc, td->td_ucred);
if (error) {
+ vm_object_deallocate(sc->object);
+ sc->object = NULL;
mddestroy(sc, td);
return (error);
}
OpenPOWER on IntegriCloud