diff options
author | kib <kib@FreeBSD.org> | 2011-07-30 14:12:37 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2011-07-30 14:12:37 +0000 |
commit | 2c49d0ddddb36a82316ce90920948d8b660a8da4 (patch) | |
tree | d086fb48fdc3f663d777e86edbcd4e0b44da209c | |
parent | 7b65cdec5b046aa47c46681cde5d25276a0ade42 (diff) | |
download | FreeBSD-src-2c49d0ddddb36a82316ce90920948d8b660a8da4.zip FreeBSD-src-2c49d0ddddb36a82316ce90920948d8b660a8da4.tar.gz |
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
-rw-r--r-- | sys/kern/kern_conf.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/kern/kern_conf.c b/sys/kern/kern_conf.c index a4d90c7..8da16d2 100644 --- a/sys/kern/kern_conf.c +++ b/sys/kern/kern_conf.c @@ -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); } } |