Commit 5b1ded22 authored by Marc-André Lureau's avatar Marc-André Lureau
Browse files

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: default avatarMarc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: default avatarEric Blake <eblake@redhat.com>
parent 34e46f60
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
}