[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [PATCH 1/3] util: Resolve Coverity RESOURCE_LEAK



Coverity determined that 'conflict' would be leaked.

Signed-off-by: Wang Rui <moon wangrui huawei com>
---
 src/util/virpci.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/util/virpci.c b/src/util/virpci.c
index 0098d6c..f1d4499 100644
--- a/src/util/virpci.c
+++ b/src/util/virpci.c
@@ -801,6 +801,7 @@ virPCIDeviceTrySecondaryBusReset(virPCIDevicePtr dev,
         virReportError(VIR_ERR_INTERNAL_ERROR,
                        _("Active %s devices on bus with %s, not doing bus reset"),
                        conflict->name, dev->name);
+        virPCIDeviceFree(conflict);
         return -1;
     }
 
-- 
1.7.12.4



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]