diff options
author | Markus Armbruster <armbru@redhat.com> | 2014-05-28 11:17:03 +0200 |
---|---|---|
committer | Michael Roth <mdroth@linux.vnet.ibm.com> | 2014-07-03 16:31:29 -0500 |
commit | 7267e51b324dd23837b244261417c7002054430f (patch) | |
tree | 3aff24bd1681c8a5eee8096ba78c6f9788a59923 | |
parent | d1775fe94a1bbfb337c7e6d178a81de3c5339d3f (diff) | |
download | qemu-7267e51b324dd23837b244261417c7002054430f.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>
-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 5880b3e42b..e9007c9ae5 100644 --- a/block/qapi.c +++ b/block/qapi.c @@ -471,6 +471,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: |