diff options
author | rwatson <rwatson@FreeBSD.org> | 2012-12-30 21:10:48 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2012-12-30 21:10:48 +0000 |
commit | d91a839079c15aaf01982d22cec17dd3286f9943 (patch) | |
tree | 3c7dfa8e4447a78edcda3fd981b4e69934cb4c6a /sys/dev/fdt | |
parent | 1e6b48e616e0254370d121cb6a306ec4ceaa9c96 (diff) | |
download | FreeBSD-src-d91a839079c15aaf01982d22cec17dd3286f9943.zip FreeBSD-src-d91a839079c15aaf01982d22cec17dd3286f9943.tar.gz |
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
Diffstat (limited to 'sys/dev/fdt')
-rw-r--r-- | sys/dev/fdt/fdtbus.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/dev/fdt/fdtbus.c b/sys/dev/fdt/fdtbus.c index 2ca7ab5..770c4c8 100644 --- a/sys/dev/fdt/fdtbus.c +++ b/sys/dev/fdt/fdtbus.c @@ -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); |