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