From 5b1ded224f46d56053f419cf24c1335b6dde40ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Mon, 18 Jul 2016 15:11:36 +0400 Subject: [PATCH] tests: fix rsp leak in postcopy-test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In all cases, even when the dict doesn't contain 'ram', the qmp response must be unref. Signed-off-by: Marc-André Lureau Reviewed-by: Eric Blake --- tests/postcopy-test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/postcopy-test.c b/tests/postcopy-test.c index 229e9e901a..bf4e579554 100644 --- a/tests/postcopy-test.c +++ b/tests/postcopy-test.c @@ -260,8 +260,8 @@ static uint64_t get_migration_pass(void) } else { rsp_ram = qdict_get_qdict(rsp_return, "ram"); result = qdict_get_try_int(rsp_ram, "dirty-sync-count", 0); - QDECREF(rsp); } + QDECREF(rsp); return result; } -- GitLab