Added a sanity check to device.c.

This commit is contained in:
OBattler
2024-07-19 22:02:02 +02:00
parent 78293cffd1
commit 652ffa646e

View File

@@ -186,7 +186,8 @@ device_add_common(const device_t *dev, void *p, void *params, int inst)
devices[c] = NULL;
device_priv[c] = NULL;
free(init_dev);
if (init_dev != NULL)
free(init_dev);
return (NULL);
}