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

Submitted by Kevin Wolf on April 30, 2010, 2 p.m.

Details

Message ID 1272636040-17374-19-git-send-email-kwolf@redhat.com
State New
Headers show

Commit Message

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 hide | download patch | download mbox

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;
         }