Commit 98646a11 authored by Markus Armbruster's avatar Markus Armbruster Committed by Michael Roth
Browse files

block/qapi: Plug memory leak in dump_qobject() case QTYPE_QERROR

Introduced in commit a8d8ecb7

.  Spotted by Coverity.

Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
Reviewed-by: default avatarBenoit Canet <benoit@irqsave.net>
Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
(cherry picked from commit f25391c2

)
Signed-off-by: default avatarMichael Roth <mdroth@linux.vnet.ibm.com>
parent 53bdfb5b
......@@ -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:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment