aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2014-05-28 11:16:54 +0200
committerKevin Wolf <kwolf@redhat.com>2014-05-30 14:25:58 +0200
commitebee92b4fef9defa19a8c348ec8b2716732ad4df (patch)
treee1bacea7777c7d4da8207f2881b1033e4c2d28d3
parentd7d3d6092cb7edc75dc49fb90c86dd5425ab4805 (diff)
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>
-rw-r--r--qemu-img.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/qemu-img.c b/qemu-img.c
index 1ad899e03b..62ea27eae5 100644
--- a/qemu-img.c
+++ b/qemu-img.c
@@ -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,