add it to the syntax-check list and fix the one offending caller.
---
cfg.mk | 1 +
src/util/virpci.c | 3 +--
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/cfg.mk b/cfg.mk
index c093bf2..bbe84b3 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -165,6 +165,7 @@ useless_free_options = \
--name=virNodeDeviceObjFree \
--name=virObjectUnref \
--name=virObjectFreeCallback \
+ --name=virPCIDeviceFree \
--name=virSecretDefFree \
--name=virStorageEncryptionFree \
--name=virStorageEncryptionSecretFree \
diff --git a/src/util/virpci.c b/src/util/virpci.c
index 1346ec1..89c1eea 100644
--- a/src/util/virpci.c
+++ b/src/util/virpci.c
@@ -1671,8 +1671,7 @@ virPCIDeviceListDel(virPCIDeviceListPtr list,
virPCIDevicePtr dev)
{
virPCIDevicePtr ret = virPCIDeviceListSteal(list, dev);
- if (ret)
- virPCIDeviceFree(ret);
+ virPCIDeviceFree(ret);
}
int
--
1.7.11.7