[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-stable] [PATCH 02/14] block/vvfat: Plug memory leak in enable_writ
From: |
Markus Armbruster |
Subject: |
[Qemu-stable] [PATCH 02/14] block/vvfat: Plug memory leak in enable_write_target() |
Date: |
Mon, 26 May 2014 19:37:03 +0200 |
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 <address@hidden>
---
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