diff --git a/qemu-img.c b/qemu-img.c index c7b394a7f9148f81f85af64a94261ffb5b2f800b..66a7eb4045cde49005a4689e1c9a99b84d79b7b0 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -2948,7 +2948,9 @@ static int img_amend(int argc, char **argv) } if (optind != argc - 1) { - error_exit("Expecting one image file name"); + error_report("Expecting one image file name"); + ret = -1; + goto out; } flags = BDRV_O_FLAGS | BDRV_O_RDWR;