svn commit: r244871 - head/sys/dev/fdt

Robert Watson rwatson at FreeBSD.org
Sun Dec 30 21:10:49 UTC 2012


Author: rwatson
Date: Sun Dec 30 21:10:48 2012
New Revision: 244871
URL: http://svnweb.freebsd.org/changeset/base/244871

Log:
  When a partially initialised FDT-based device instance can't attach,
  perhaps due to an interrupt configuration problem, do not try to free
  device ivars that have not yet have been allocated.
  
  MFC after:	1 week
  Reviewed by:	gonzo
  Sponsored by:	DARPA, AFRL

Modified:
  head/sys/dev/fdt/fdtbus.c

Modified: head/sys/dev/fdt/fdtbus.c
==============================================================================
--- head/sys/dev/fdt/fdtbus.c	Sun Dec 30 21:07:21 2012	(r244870)
+++ head/sys/dev/fdt/fdtbus.c	Sun Dec 30 21:10:48 2012	(r244871)
@@ -257,6 +257,8 @@ newbus_device_destroy(device_t dev)
 	struct fdtbus_devinfo *di;
 
 	di = device_get_ivars(dev);
+	if (di == NULL)
+		return;
 
 	free(di->di_name, M_OFWPROP);
 	free(di->di_type, M_OFWPROP);


More information about the svn-src-head mailing list