Changeset 5c058b6e in mainline


Ignore:
Timestamp:
2013-01-06T13:18:48Z (12 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
e646c61
Parents:
44d518b
Message:

libusbvirt: Add malloc check.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/usbvirt/src/virthub_base.c

    r44d518b r5c058b6e  
    8282        instance->device.ops = ops;
    8383        instance->device.descriptors = &instance->descriptors;
    84         instance->device.name = str_dup(name);
    8584        instance->device.device_data = instance;
    8685        instance->device.address = 0;
    8786        instance->data = data;
     87        instance->device.name = str_dup(name);
     88
     89        if (!instance->device.name)
     90                return ENOMEM;
    8891
    8992        return EOK;
Note: See TracChangeset for help on using the changeset viewer.