[PATCH] src: fix resource leak introduced in d4439a6b8

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

 



@tmp that was copied just above is leaked on plain return.
The issue is found by Coverity.

Patch that inroduced a leak:
d4439a6b8 : src: adopt to VIR_DRV_SUPPORTS_FEATURE return -1

Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy@xxxxxxxxxxxxx>
---
 src/libvirt-domain.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c
index 2f9081a..c9f8ffd 100644
--- a/src/libvirt-domain.c
+++ b/src/libvirt-domain.c
@@ -3022,7 +3022,7 @@ virDomainMigrateVersion3Full(virDomainPtr domain,
     ret = VIR_DRV_SUPPORTS_FEATURE(domain->conn->driver, domain->conn,
                                    VIR_DRV_FEATURE_MIGRATE_CHANGE_PROTECTION);
     if (ret < 0)
-        return NULL;
+        goto done;
     if (ret)
         protection = VIR_MIGRATE_CHANGE_PROTECTION;
 
-- 
1.8.3.1




[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