I figure the leak originated in bdrv_create2(), and was duplicated
into callers when commit 91a073ak dropped that function.  Looks like
the other places have since been fixed.

Spotted by Coverity.

Signed-off-by: Markus Armbruster <arm...@redhat.com>
---
 block/vvfat.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/block/vvfat.c b/block/vvfat.c
index c3af7ff..6a0d246 100644
--- a/block/vvfat.c
+++ b/block/vvfat.c
@@ -2927,6 +2927,7 @@ static int enable_write_target(BDRVVVFATState *s)
     set_option_parameter(options, BLOCK_OPT_BACKING_FILE, "fat:");
 
     ret = bdrv_create(bdrv_qcow, s->qcow_filename, options, &local_err);
+    free_option_parameters(options);
     if (ret < 0) {
         qerror_report_err(local_err);
         error_free(local_err);
-- 
1.9.3


Reply via email to