Added 'usbFreeDevice' to the useless_free_options list in cfg.mk
--name=qemuMigrationCookieFree \
--name=qemuMigrationCookieGraphicsFree \
--name=sexpr_free \
+ --name=usbFreeDevice \
--name=virBandwidthDefFree \
--name=virBitmapFree \
--name=virCPUDefFree \
void
usbFreeDevice(usbDevice *dev)
{
+ if (!dev)
+ return;
VIR_DEBUG("%s %s: freeing", dev->id, dev->name);
VIR_FREE(dev->path);
VIR_FREE(dev);
usbDevice *dev)
{
usbDevice *ret = usbDeviceListSteal(list, dev);
- if (ret)
- usbFreeDevice(ret);
+ usbFreeDevice(ret);
}
usbDevice *