[PATCH 4/9] util: Fix memory leak in virPCIProbeStubDriver

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

 



Since 9ea90206, @drvpath could be overwritten if we jumped to recheck

Found by Coverity.

Signed-off-by: John Ferlan <jferlan@xxxxxxxxxx>
---
 src/util/virpci.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/util/virpci.c b/src/util/virpci.c
index 6c7e6bbcab..16936c4be9 100644
--- a/src/util/virpci.c
+++ b/src/util/virpci.c
@@ -1018,6 +1018,7 @@ virPCIProbeStubDriver(virPCIStubDriver driver)
             goto cleanup;
         }
 
+        g_free(drvpath);
         goto recheck;
     }
 
-- 
2.25.4




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux