Skip to content

Commit

Permalink
tests: fix rsp leak in postcopy-test
Browse files Browse the repository at this point in the history
In all cases, even when the dict doesn't contain 'ram', the qmp response
must be unref.

Signed-off-by: Marc-André Lureau <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
  • Loading branch information
elmarco committed Sep 8, 2016
1 parent 34e46f6 commit 5b1ded2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/postcopy-test.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 5b1ded2

Please sign in to comment.