src: fix resource leak introduced in d4439a6b8

@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@virtuozzo.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
Nikolay Shirokovskiy 2021-01-07 16:09:19 +03:00
parent c9e55f92fd
commit 3c97cb2cad

View File

@ -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;