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

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

Modified:
  stable/8/sys/geom/label/g_label.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/ixgbe/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)
  stable/8/sys/geom/sched/   (props changed)

Modified: stable/8/sys/geom/label/g_label.c
==============================================================================
--- stable/8/sys/geom/label/g_label.c   Tue Jun 22 08:05:54 2010        
(r209422)
+++ stable/8/sys/geom/label/g_label.c   Tue Jun 22 08:17:20 2010        
(r209423)
@@ -203,10 +203,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);
 }
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to