diff --git a/usr.bin/mkimg/vhd.c b/usr.bin/mkimg/vhd.c index d747450ff1fd..ee9091ca134c 100644 --- a/usr.bin/mkimg/vhd.c +++ b/usr.bin/mkimg/vhd.c @@ -282,6 +282,7 @@ vhd_write(int fd) blk = 0; blkcnt = VHD_BLOCK_SIZE / secsz; + error = 0; nblks = image_get_size(); while (blk < nblks) { if (!image_data(blk, blkcnt)) {