svn commit: r209424 - stable/7/sys/geom/label

Andriy Gapon avg at FreeBSD.org
Tue Jun 22 08:17:55 UTC 2010


Author: avg
Date: Tue Jun 22 08:17:55 2010
New Revision: 209424
URL: http://svn.freebsd.org/changeset/base/209424

Log:
  MFC r208672: g_label: fix possible NULL pointer dereference

Modified:
  stable/7/sys/geom/label/g_label.c
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/cddl/contrib/opensolaris/   (props changed)
  stable/7/sys/contrib/dev/acpica/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/geom/label/g_label.c
==============================================================================
--- stable/7/sys/geom/label/g_label.c	Tue Jun 22 08:17:20 2010	(r209423)
+++ stable/7/sys/geom/label/g_label.c	Tue Jun 22 08:17:55 2010	(r209424)
@@ -202,10 +202,8 @@ g_label_destroy(struct g_geom *gp, boole
 			    pp->acr, pp->acw, pp->ace);
 			return (EBUSY);
 		}
-	} else {
-		G_LABEL_DEBUG(1, "Label %s removed.",
-		    LIST_FIRST(&gp->provider)->name);
-	}
+	} else if (pp != NULL)
+		G_LABEL_DEBUG(1, "Label %s removed.", pp->name);
 	g_slice_spoiled(LIST_FIRST(&gp->consumer));
 	return (0);
 }


More information about the svn-src-all mailing list