On Tue, Aug 25, 2020 at 07:47:07 +0200, Martin Kletzander wrote:
Signed-off-by: Martin Kletzander <mkletzan(a)redhat.com>
---
src/qemu/qemu_migration.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
index 142faa2cf997..60ddfde65d46 100644
--- a/src/qemu/qemu_migration.c
+++ b/src/qemu/qemu_migration.c
@@ -3369,7 +3369,7 @@ qemuMigrationSrcConnect(virQEMUDriverPtr driver,
{
virNetSocketPtr sock;
const char *host;
- char *port = NULL;
+ g_autofree char *port = NULL;
int ret = -1;
host = spec->dest.host.name;
@@ -3400,7 +3400,6 @@ qemuMigrationSrcConnect(virQEMUDriverPtr driver,
ret = 0;
cleanup:
- VIR_FREE(port);
if (ret < 0)
VIR_FORCE_CLOSE(spec->dest.fd.qemu);
return ret;
Reviewed-by: Jiri Denemark <jdenemar(a)redhat.com>