Fix the devmtx lock leak from make_dev(9) when the old device cloning

failed due to invalid or duplicated path being generated.

Reviewed by:	jh
Approved by:	re (kensmith)
MFC after:	1 week
This commit is contained in:
Konstantin Belousov 2011-07-30 14:12:37 +00:00
parent 99271119d3
commit 889dffba25
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=224521

View File

@ -764,7 +764,8 @@ make_dev_credv(int flags, struct cdev **dres, struct cdevsw *devsw, int unit,
LIST_REMOVE(dev, si_list);
dev_unlock();
devfs_free(dev);
}
} else
dev_unlock();
return (res);
}
}