提交 a87a6721 编写于 作者: S Stefan Hajnoczi 提交者: Kevin Wolf

qemu-img: Free option parameter lists in img_create()

Free option parameter lists in the img_create() error return path.
Signed-off-by: NStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: NKevin Wolf <kwolf@redhat.com>
上级 0e72e753
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册