Patchwork [18/18] block: Release allocated options after bdrv_open

login
register
mail settings
Submitter Kevin Wolf
Date April 30, 2010, 2 p.m.
Message ID <1272636040-17374-19-git-send-email-kwolf@redhat.com>
Download mbox | patch
Permalink /patch/51346/
State New
Headers show

Comments

Kevin Wolf - April 30, 2010, 2 p.m.
From: Jan Kiszka <jan.kiszka@siemens.com>

They aren't used afterwards nor supposed to be stored by a bdrv_create
handler.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
 block.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

Patch

diff --git a/block.c b/block.c
index f463ec4..48305b7 100644
--- a/block.c
+++ b/block.c
@@ -540,6 +540,7 @@  int bdrv_open(BlockDriverState *bs, const char *filename, int flags,
         }
 
         ret = bdrv_create(bdrv_qcow2, tmp_filename, options);
+        free_option_parameters(options);
         if (ret < 0) {
             return ret;
         }