projects
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5d371f4
)
tests: test-qmp-commands: Fix double free
author
Luiz Capitulino
<lcapitulino@redhat.com>
Sat, 8 Mar 2014 17:20:06 +0000
(12:20 -0500)
committer
Luiz Capitulino
<lcapitulino@redhat.com>
Tue, 11 Mar 2014 13:07:42 +0000
(09:07 -0400)
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>
tests/test-qmp-commands.c
patch
|
blob
|
history
diff --git
a/tests/test-qmp-commands.c
b/tests/test-qmp-commands.c
index 8e62c2d8ad4de22183005340c0a4018745fd8c56..554e222b32d024e56e4147a27f075133c0aa5466 100644
(file)
--- 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(ret
3
);
QDECREF(req);
}