diff options
author | Markus Armbruster <armbru@redhat.com> | 2014-05-28 11:17:03 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2014-05-30 14:26:54 +0200 |
commit | f25391c2a6ef1674384204265429520ea50e82bc (patch) | |
tree | 68b7ed23f2352750d63ad46098ac3ff813e72ffb | |
parent | 3cb0e25c4b417b7336816bd92de458f0770d49ff (diff) | |
download | qemu-f25391c2a6ef1674384204265429520ea50e82bc.zip qemu-f25391c2a6ef1674384204265429520ea50e82bc.tar.gz qemu-f25391c2a6ef1674384204265429520ea50e82bc.tar.bz2 |
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>
-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 75f44f1..97e1641 100644 --- a/block/qapi.c +++ b/block/qapi.c @@ -475,6 +475,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: |