aboutsummaryrefslogtreecommitdiff
path: root/qemu-img.c
diff options
context:
space:
mode:
authorStefan Hajnoczi <stefanha@linux.vnet.ibm.com>2010-12-07 09:35:55 +0000
committerKevin Wolf <kwolf@redhat.com>2010-12-14 15:44:21 +0100
commita87a6721db3975c93798b6fd6fa42996e9aa695a (patch)
tree9aa679b87c2e1912e252de1f236ca47d7dd01025 /qemu-img.c
parent0e72e753c226b2d6711ca5edc1d956b810fefbcf (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>
Diffstat (limited to 'qemu-img.c')
-rw-r--r--qemu-img.c4
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;
}