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>
This commit is contained in:
parent
34e46f604d
commit
5b1ded224f
@ -260,8 +260,8 @@ static uint64_t get_migration_pass(void)
|
|||||||
} else {
|
} else {
|
||||||
rsp_ram = qdict_get_qdict(rsp_return, "ram");
|
rsp_ram = qdict_get_qdict(rsp_return, "ram");
|
||||||
result = qdict_get_try_int(rsp_ram, "dirty-sync-count", 0);
|
result = qdict_get_try_int(rsp_ram, "dirty-sync-count", 0);
|
||||||
QDECREF(rsp);
|
|
||||||
}
|
}
|
||||||
|
QDECREF(rsp);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user