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>
This commit is contained in:
parent
0e72e753c2
commit
a87a6721db
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user