Added a sanity check to device.c.
This commit is contained in:
@@ -186,7 +186,8 @@ device_add_common(const device_t *dev, void *p, void *params, int inst)
|
|||||||
devices[c] = NULL;
|
devices[c] = NULL;
|
||||||
device_priv[c] = NULL;
|
device_priv[c] = NULL;
|
||||||
|
|
||||||
free(init_dev);
|
if (init_dev != NULL)
|
||||||
|
free(init_dev);
|
||||||
|
|
||||||
return (NULL);
|
return (NULL);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user