qemu-img: avoid calling exit(1) to release resources properly

This patch removes exit(1) from error(), and properly releases
resources such as a block driver and an allocated memory.

For testing the Sheepdog block driver with qemu-iotests, it is
necessary to call bdrv_delete() before the program exits.  Because the
driver releases the lock of VM images in the close handler.

Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
MORITA Kazutaka
2010-07-02 13:18:02 +02:00
committed by Kevin Wolf
parent c0897e0cb9
commit c2abccecd9
+185 -52
View File
File diff suppressed because it is too large Load Diff