Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 11 Dec 2008 02:23:49 +0000 (UTC)
From:      Paul Saab <ps@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r185902 - head/sys/boot/zfs
Message-ID:  <200812110223.mBB2NnjW049843@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ps
Date: Thu Dec 11 02:23:49 2008
New Revision: 185902
URL: http://svn.freebsd.org/changeset/base/185902

Log:
  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.

Modified:
  head/sys/boot/zfs/zfs.c

Modified: head/sys/boot/zfs/zfs.c
==============================================================================
--- head/sys/boot/zfs/zfs.c	Thu Dec 11 01:41:38 2008	(r185901)
+++ head/sys/boot/zfs/zfs.c	Thu Dec 11 02:23:49 2008	(r185902)
@@ -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) {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200812110223.mBB2NnjW049843>