From f25391c2a6ef1674384204265429520ea50e82bc Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Wed, 28 May 2014 11:17:03 +0200 Subject: block/qapi: Plug memory leak in dump_qobject() case QTYPE_QERROR Introduced in commit a8d8ecb. Spotted by Coverity. Signed-off-by: Markus Armbruster Reviewed-by: Benoit Canet Signed-off-by: Kevin Wolf --- block/qapi.c | 1 + 1 file changed, 1 insertion(+) 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: -- cgit v1.1