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