[libvirt PATCH 13/20] openvz: use g_auto in openvzDomainMigratePerform3Params

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

 



Signed-off-by: Ján Tomko <jtomko@xxxxxxxxxx>
---
 src/openvz/openvz_driver.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/openvz/openvz_driver.c b/src/openvz/openvz_driver.c
index d4c65dbc26..b2589059c8 100644
--- a/src/openvz/openvz_driver.c
+++ b/src/openvz/openvz_driver.c
@@ -2113,8 +2113,8 @@ openvzDomainMigratePerform3Params(virDomainPtr domain,
     struct openvz_driver *driver = domain->conn->privateData;
     virDomainObj *vm = NULL;
     const char *uri_str = NULL;
-    virURI *uri = NULL;
-    virCommand *cmd = NULL;
+    g_autoptr(virURI) uri = NULL;
+    g_autoptr(virCommand) cmd = NULL;
     int ret = -1;
 
     virCheckFlags(OPENVZ_MIGRATION_FLAGS, -1);
@@ -2146,8 +2146,6 @@ openvzDomainMigratePerform3Params(virDomainPtr domain,
     ret = 0;
 
  cleanup:
-    virCommandFree(cmd);
-    virURIFree(uri);
     virDomainObjEndAPI(&vm);
     return ret;
 }
-- 
2.31.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