mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-18 14:23:55 +00:00
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:
parent
c857d06af7
commit
ff82fb46d4
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=244871
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue