diff --git a/qemu-img.c b/qemu-img.c index a9a2470e1a0eeea3bf60eb71be46af8eae3a6b2a..ad04f5956547f7d2944a7ce56eb856e664ad8aaa 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -263,6 +263,7 @@ static int print_block_option_help(const char *filename, const char *fmt) if (!proto_drv->create_opts) { error_report("Protocol driver '%s' does not support image creation", proto_drv->format_name); + qemu_opts_free(create_opts); return 1; } create_opts = qemu_opts_append(create_opts, proto_drv->create_opts);