block/io: bdrv_pad_request(): support qemu_iovec_init_extended failure
commit98ca45494fcd6bf0336ecd559e440b6de6ea4cd3
authorVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Fri, 11 Dec 2020 18:39:23 +0000 (11 21:39 +0300)
committerEric Blake <eblake@redhat.com>
Wed, 3 Feb 2021 14:14:00 +0000 (3 08:14 -0600)
tree2a96f3b35e08958d0289fd171d78a01e1f78c6ea
parentf0deecff827c838a71f83539b0572094aefe3d5e
block/io: bdrv_pad_request(): support qemu_iovec_init_extended failure

Make bdrv_pad_request() honest: return error if
qemu_iovec_init_extended() failed.

Update also bdrv_padding_destroy() to clean the structure for safety.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Message-Id: <20201211183934.169161-6-vsementsov@virtuozzo.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
block/io.c