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:
parent
99271119d3
commit
889dffba25
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user