qemu-img: Plug memory leak on block option help error path

Introduced in commit a283cb6; mostly harmless.  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>
This commit is contained in:
Markus Armbruster 2014-05-28 11:16:54 +02:00 committed by Kevin Wolf
parent d7d3d6092c
commit ebee92b4fe
1 changed files with 1 additions and 0 deletions

View File

@ -287,6 +287,7 @@ static int print_block_option_help(const char *filename, const char *fmt)
proto_drv = bdrv_find_protocol(filename, true);
if (!proto_drv) {
error_report("Unknown protocol '%s'", filename);
free_option_parameters(create_options);
return 1;
}
create_options = append_option_parameters(create_options,