diff --git a/stand/uboot/devicename.c b/stand/uboot/devicename.c --- a/stand/uboot/devicename.c +++ b/stand/uboot/devicename.c @@ -148,6 +148,10 @@ goto fail; } idev->dd.d_dev = dv; + /* + * dev can be NULL, since ubot_getdev calls us directly, rather than via + * dv_parsedev in devparse() which otherwise ensures that it can't be NULL. + */ if (dev == NULL) { free(idev); } else {