tests: test-qmp-commands: Fix double free

The ret variable is freed twice, but on the second time we actually want
to free ret3 instead. Don't know why this didn't explode.

Reported-by: Peter Maydell <peter.maydell@linaro.org>
Tested-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
This commit is contained in:
Luiz Capitulino 2014-03-08 12:20:06 -05:00
parent 5d371f41b4
commit 2a7a1a56d1
1 changed files with 1 additions and 1 deletions

View File

@ -141,7 +141,7 @@ static void test_dispatch_cmd_io(void)
ret3 = qobject_to_qint(test_qmp_dispatch(req));
assert(qint_get_int(ret3) == 66);
QDECREF(ret);
QDECREF(ret3);
QDECREF(req);
}