]> git.proxmox.com Git - qemu.git/commit
qemu-img: avoid calling exit(1) to release resources properly
authorMORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
Sun, 20 Jun 2010 19:26:35 +0000 (04:26 +0900)
committerKevin Wolf <kwolf@redhat.com>
Fri, 2 Jul 2010 11:18:02 +0000 (13:18 +0200)
commitc2abccecd93d5977460fdfdab19461ccfa09ae21
tree7e7db3f9117ca14cb38d8311dc92c4353fcb46c1
parentc0897e0cb94e83ec1098867b81870e4f51f225b9
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>
qemu-img.c