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:
ps 2008-12-11 02:23:49 +00:00
parent 1dec308af8
commit dcd4d48fc8

View File

@ -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) {