summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorLuiz Capitulino2014-03-08 18:20:06 +0100
committerLuiz Capitulino2014-03-11 14:07:42 +0100
commit2a7a1a56d1e30de07cf7d7636a35bf7706b9500e (patch)
tree39e8132d10ca83ee51fb1e00936ee103d37593a0 /tests
parentqapi script: do not add "_" for every capitalized char in enum (diff)
downloadqemu-2a7a1a56d1e30de07cf7d7636a35bf7706b9500e.tar.gz
qemu-2a7a1a56d1e30de07cf7d7636a35bf7706b9500e.tar.xz
qemu-2a7a1a56d1e30de07cf7d7636a35bf7706b9500e.zip
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>
Diffstat (limited to 'tests')
-rw-r--r--tests/test-qmp-commands.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/test-qmp-commands.c b/tests/test-qmp-commands.c
index 8e62c2d8ad..554e222b32 100644
--- a/tests/test-qmp-commands.c
+++ b/tests/test-qmp-commands.c
@@ -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);
}
6a0fcbb4dad1 ^
653ebd9c8510 ^
21ea28abcf82 ^

6a0fcbb4dad1 ^


0a270321dbf9 ^
5cde0af2a982 ^
21ea28abcf82 ^

6a0fcbb4dad1 ^
055bcee3102d ^
bc94e59662c1 ^
a1d2f0954406 ^
21ea28abcf82 ^
da7f033ddc9f ^
6a0fcbb4dad1 ^
a38f7907b926 ^
1da177e4c3f4
f1939f7c5645 ^
333b0d7eeacb ^
1da177e4c3f4


c6580eb8b17d ^

c555c28d9da5 ^

ad5d27899fdb ^

78f8b3a24022 ^
1da177e4c3f4

c494e0705d67 ^
db131ef90841 ^

91652be5d1b9 ^
76cb9521795a ^
64470f1b8510 ^
f19f5111c940 ^