diff --git a/sys/dev/fdt/fdtbus.c b/sys/dev/fdt/fdtbus.c index 2ca7ab54ab8f..770c4c846c14 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);