]> git.proxmox.com Git - mirror_qemu.git/blobdiff - qemu-img.c
usb: rearrange usb_ep_get()
[mirror_qemu.git] / qemu-img.c
index 13a6ca31b402ea50f036cb5db57bd8412a8caee2..25288c4d18d34ff1d95474ad1b246fffc8ccddf0 100644 (file)
@@ -261,8 +261,9 @@ static int print_block_option_help(const char *filename, const char *fmt)
             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);
@@ -4961,7 +4962,7 @@ int main(int argc, char **argv)
         return 0;
     }
     argv += optind;
-    optind = 0;
+    qemu_reset_optind();
 
     if (!trace_init_backends()) {
         exit(1);