diff options
author | Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> | 2010-12-07 09:35:55 +0000 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2010-12-14 15:44:21 +0100 |
commit | a87a6721db3975c93798b6fd6fa42996e9aa695a (patch) | |
tree | 9aa679b87c2e1912e252de1f236ca47d7dd01025 | |
parent | 0e72e753c226b2d6711ca5edc1d956b810fefbcf (diff) |
qemu-img: Free option parameter lists in img_create()
Free option parameter lists in the img_create() error return path.
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
-rw-r--r-- | qemu-img.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/qemu-img.c b/qemu-img.c index d146d8c843..c5a173cb61 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -428,8 +428,6 @@ static int img_create(int argc, char **argv) puts(""); ret = bdrv_create(drv, filename, param); - free_option_parameters(create_options); - free_option_parameters(param); if (ret < 0) { if (ret == -ENOTSUP) { @@ -441,6 +439,8 @@ static int img_create(int argc, char **argv) } } out: + free_option_parameters(create_options); + free_option_parameters(param); if (ret) { return 1; } |