diff --git a/qemu-img.c b/qemu-img.c index e2cc92635ffad0dd1878549b1e7c71dcbc2d4023..f9d8b7d99bbe4c82de192c9f86a02c185b4c7e1b 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -208,7 +208,6 @@ static int img_create(int argc, char **argv) uint64_t size; const char *p; BlockDriver *drv; - BlockDriverState *bs; flags = 0; for(;;) { @@ -238,6 +237,7 @@ static int img_create(int argc, char **argv) filename = argv[optind++]; size = 0; if (base_filename) { + BlockDriverState *bs; bs = bdrv_new_open(base_filename, NULL); bdrv_get_geometry(bs, &size); size *= 512; @@ -279,9 +279,6 @@ static int img_create(int argc, char **argv) error("Error while formatting"); } } - /* to set password */ - bs = bdrv_new_open(filename, NULL); - bdrv_delete(bs); return 0; }