[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 11/11] tests: test-qmp-commands: Fix double free
From: |
Luiz Capitulino |
Subject: |
[Qemu-devel] [PULL 11/11] tests: test-qmp-commands: Fix double free |
Date: |
Tue, 11 Mar 2014 09:41:11 -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 <address@hidden>
Tested-by: Peter Maydell <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Luiz Capitulino <address@hidden>
---
tests/test-qmp-commands.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/test-qmp-commands.c b/tests/test-qmp-commands.c
index 8e62c2d..554e222 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);
}
--
1.8.1.4
- [Qemu-devel] [PULL for-2.0 00/11] QMP queue, Luiz Capitulino, 2014/03/11
- [Qemu-devel] [PULL 06/11] qapi script: use same function to generate enum string, Luiz Capitulino, 2014/03/11
- [Qemu-devel] [PULL 05/11] qapi script: code move for generate_enum_name(), Luiz Capitulino, 2014/03/11
- [Qemu-devel] [PULL 01/11] qapi script: remember explicitly defined enum values, Luiz Capitulino, 2014/03/11
- [Qemu-devel] [PULL 02/11] qapi script: add check for duplicated key, Luiz Capitulino, 2014/03/11
- [Qemu-devel] [PULL 03/11] qapi script: remember line number in schema parsing, Luiz Capitulino, 2014/03/11
- [Qemu-devel] [PULL 08/11] qapi: convert BlockdevOptions to use enum discriminator, Luiz Capitulino, 2014/03/11
- [Qemu-devel] [PULL 10/11] qapi script: do not add "_" for every capitalized char in enum, Luiz Capitulino, 2014/03/11
- [Qemu-devel] [PULL 11/11] tests: test-qmp-commands: Fix double free,
Luiz Capitulino <=
- [Qemu-devel] [PULL 07/11] qapi script: support enum type as discriminator in union, Luiz Capitulino, 2014/03/11
- [Qemu-devel] [PULL 04/11] qapi script: check correctness of union, Luiz Capitulino, 2014/03/11
- [Qemu-devel] [PULL 09/11] qapi script: do not allow string discriminator, Luiz Capitulino, 2014/03/11
- Re: [Qemu-devel] [PULL for-2.0 00/11] QMP queue, Peter Maydell, 2014/03/12