Deallocate VM object on failure.

This commit is contained in:
pjd 2004-09-14 19:55:07 +00:00
parent 4e7ebd879c
commit e32c315aa7

View File

@ -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);
}