syntax: virPCIDeviceFree is also a NOP for NULL args

add it to the syntax-check list and fix the one offending caller.
This commit is contained in:
Laine Stump 2013-06-04 16:00:46 -04:00
parent c302130277
commit d80d0d5d40
2 changed files with 2 additions and 2 deletions

1
cfg.mk
View File

@ -165,6 +165,7 @@ useless_free_options = \
--name=virNodeDeviceObjFree \
--name=virObjectUnref \
--name=virObjectFreeCallback \
--name=virPCIDeviceFree \
--name=virSecretDefFree \
--name=virStorageEncryptionFree \
--name=virStorageEncryptionSecretFree \

View File

@ -1671,8 +1671,7 @@ virPCIDeviceListDel(virPCIDeviceListPtr list,
virPCIDevicePtr dev)
{
virPCIDevicePtr ret = virPCIDeviceListSteal(list, dev);
if (ret)
virPCIDeviceFree(ret);
virPCIDeviceFree(ret);
}
int