mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-05 08:00:30 +00:00
Avoid a double free in devopen by not freeing the device structure
in zfs_dev_open. This stops a panic in the loader when trying to read from a zfs device and no zfs devices exist.
This commit is contained in:
parent
0596d7e65d
commit
390edcc5b9
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=185902
|
@ -474,7 +474,6 @@ zfs_dev_open(struct open_file *f, ...)
|
|||
* the pool.
|
||||
*/
|
||||
unit = dev->d_unit;
|
||||
free(dev);
|
||||
|
||||
i = 0;
|
||||
STAILQ_FOREACH(spa, &zfs_pools, spa_link) {
|
||||
|
|
Loading…
Reference in a new issue