diff options
author | Markus Armbruster <armbru@redhat.com> | 2014-05-28 11:17:03 +0200 |
---|---|---|
committer | Michael Roth <mdroth@linux.vnet.ibm.com> | 2014-08-05 11:41:26 -0500 |
commit | 98646a11d0977b99bd05efbd6bf8330411ebba63 (patch) | |
tree | 98fd9f90c4aac71b9d7f6ca7ff0ba86201c8157d /block | |
parent | 53bdfb5b62eee7a29c7a479bb87b47d941a30812 (diff) | |
download | qemu-98646a11d0977b99bd05efbd6bf8330411ebba63.tar.gz |
block/qapi: Plug memory leak in dump_qobject() case QTYPE_QERROR
Introduced in commit a8d8ecb. Spotted by Coverity.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Benoit Canet <benoit@irqsave.net>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
(cherry picked from commit f25391c2a6ef1674384204265429520ea50e82bc)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Diffstat (limited to 'block')
-rw-r--r-- | block/qapi.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/block/qapi.c b/block/qapi.c index 8f2b4dbe7d..a69c00d4b1 100644 --- a/block/qapi.c +++ b/block/qapi.c @@ -474,6 +474,7 @@ static void dump_qobject(fprintf_function func_fprintf, void *f, case QTYPE_QERROR: { QString *value = qerror_human((QError *)obj); func_fprintf(f, "%s", qstring_get_str(value)); + QDECREF(value); break; } case QTYPE_NONE: |