]> xenbits.xensource.com Git - libvirt.git/commitdiff
syntax: virPCIDeviceFree is also a NOP for NULL args
authorLaine Stump <laine@laine.org>
Tue, 4 Jun 2013 20:00:46 +0000 (16:00 -0400)
committerLaine Stump <laine@laine.org>
Mon, 24 Jun 2013 21:33:23 +0000 (17:33 -0400)
add it to the syntax-check list and fix the one offending caller.

cfg.mk
src/util/virpci.c

diff --git a/cfg.mk b/cfg.mk
index c093bf24835b3436c63b4c9a710b7d222b3f5334..bbe84b3174145fc6f233d59315f7a9eb15857847 100644 (file)
--- 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                \
index 1346ec175e0cfb1794f643a59e5df78553f92e4b..89c1eea4cb75c5fc7c9f2afbaaf37966a0d11c9b 100644 (file)
@@ -1671,8 +1671,7 @@ virPCIDeviceListDel(virPCIDeviceListPtr list,
                     virPCIDevicePtr dev)
 {
     virPCIDevicePtr ret = virPCIDeviceListSteal(list, dev);
-    if (ret)
-        virPCIDeviceFree(ret);
+    virPCIDeviceFree(ret);
 }
 
 int