Skip to content

Commit

Permalink
block/qapi: Plug memory leak in dump_qobject() case QTYPE_QERROR
Browse files Browse the repository at this point in the history
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 f25391c)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
  • Loading branch information
Markus Armbruster authored and mdroth committed Jul 3, 2014
1 parent d1775fe commit 7267e51
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions block/qapi.c
Expand Up @@ -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:
Expand Down

0 comments on commit 7267e51

Please sign in to comment.