return 1;
}
if (!proto_drv->create_opts) {
- error_report("Protocal driver '%s' does not support image creation",
+ 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);
return 0;
}
argv += optind;
- optind = 0;
+ qemu_reset_optind();
if (!trace_init_backends()) {
exit(1);