|
|
9119d9 |
From e172cc333ddcdb7fdfa49147f9def22da05c3b94 Mon Sep 17 00:00:00 2001
|
|
|
9119d9 |
Message-Id: <e172cc333ddcdb7fdfa49147f9def22da05c3b94@dist-git>
|
|
|
9119d9 |
From: Jiri Denemark <jdenemar@redhat.com>
|
|
|
9119d9 |
Date: Tue, 23 Sep 2014 15:47:59 +0200
|
|
|
9119d9 |
Subject: [PATCH] qemu: Fix memory leak in RDMA migration code
|
|
|
9119d9 |
|
|
|
9119d9 |
https://bugzilla.redhat.com/show_bug.cgi?id=1013055
|
|
|
9119d9 |
|
|
|
9119d9 |
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
|
|
9119d9 |
(cherry picked from commit ad56f863787d6d7f212bbffd42286349ce0ae0ad)
|
|
|
9119d9 |
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
|
|
9119d9 |
---
|
|
|
9119d9 |
src/qemu/qemu_migration.c | 5 +++--
|
|
|
9119d9 |
1 file changed, 3 insertions(+), 2 deletions(-)
|
|
|
9119d9 |
|
|
|
9119d9 |
diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
|
|
|
9119d9 |
index fda7cda..1db9108 100644
|
|
|
9119d9 |
--- a/src/qemu/qemu_migration.c
|
|
|
9119d9 |
+++ b/src/qemu/qemu_migration.c
|
|
|
9119d9 |
@@ -3792,13 +3792,13 @@ static int doNativeMigrate(virQEMUDriverPtr driver,
|
|
|
9119d9 |
virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
|
|
|
9119d9 |
_("outgoing RDMA migration is not supported "
|
|
|
9119d9 |
"with this QEMU binary"));
|
|
|
9119d9 |
- return -1;
|
|
|
9119d9 |
+ goto cleanup;
|
|
|
9119d9 |
}
|
|
|
9119d9 |
if (!vm->def->mem.hard_limit) {
|
|
|
9119d9 |
virReportError(VIR_ERR_OPERATION_INVALID, "%s",
|
|
|
9119d9 |
_("cannot start RDMA migration with no memory hard "
|
|
|
9119d9 |
"limit set"));
|
|
|
9119d9 |
- return -1;
|
|
|
9119d9 |
+ goto cleanup;
|
|
|
9119d9 |
}
|
|
|
9119d9 |
}
|
|
|
9119d9 |
|
|
|
9119d9 |
@@ -3819,6 +3819,7 @@ static int doNativeMigrate(virQEMUDriverPtr driver,
|
|
|
9119d9 |
if (spec.destType == MIGRATION_DEST_FD)
|
|
|
9119d9 |
VIR_FORCE_CLOSE(spec.dest.fd.qemu);
|
|
|
9119d9 |
|
|
|
9119d9 |
+ cleanup:
|
|
|
9119d9 |
virURIFree(uribits);
|
|
|
9119d9 |
|
|
|
9119d9 |
return ret;
|
|
|
9119d9 |
--
|
|
|
9119d9 |
2.1.1
|
|
|
9119d9 |
|