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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user