aboutsummaryrefslogtreecommitdiff
path: root/tests/postcopy-test.c
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2016-07-18 15:11:36 +0400
committerMarc-André Lureau <marcandre.lureau@redhat.com>2016-09-08 18:05:22 +0400
commit5b1ded224f46d56053f419cf24c1335b6dde40ee (patch)
tree6543c9833445805e239b7b9d062ecf07482495ec /tests/postcopy-test.c
parent34e46f604d3cf26144b4e02989f2f096e3dc2a41 (diff)
downloadqemu-5b1ded224f46d56053f419cf24c1335b6dde40ee.zip
qemu-5b1ded224f46d56053f419cf24c1335b6dde40ee.tar.gz
qemu-5b1ded224f46d56053f419cf24c1335b6dde40ee.tar.bz2
tests: fix rsp leak in postcopy-test
In all cases, even when the dict doesn't contain 'ram', the qmp response must be unref. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'tests/postcopy-test.c')
-rw-r--r--tests/postcopy-test.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/postcopy-test.c b/tests/postcopy-test.c
index 229e9e9..bf4e579 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;
}