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
This commit is contained in:
Robert Watson 2012-12-30 21:10:48 +00:00
parent c857d06af7
commit ff82fb46d4
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=244871

View file

@ -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);