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:
Paul Saab 2008-12-11 02:23:49 +00:00
parent 0596d7e65d
commit 390edcc5b9
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=185902

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