1
0
forked from drath/libratbag

Remove superfluous check for strdup() ENOMEM

If that happens, strdup_safe() will abort.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer
2016-03-11 12:11:26 +10:00
parent 43ab3c961e
commit 52fea6f3ce

View File

@@ -156,12 +156,6 @@ ratbag_device_new(struct ratbag *ratbag, struct udev_device *udev_device,
device = zalloc(sizeof(*device));
device->name = strdup_safe(name);
if (!name) {
free(device);
return NULL;
}
device->ratbag = ratbag_ref(ratbag);
device->refcount = 1;
if (udev_device)