block: Fix memory leaks in bdrv_co_do_pwritev()
commit99c4a85ce65863e6ba6668164d47c0d7c645e3aa
authorKevin Wolf <kwolf@redhat.com>
Fri, 7 Feb 2014 14:29:00 +0000 (7 15:29 +0100)
committerKevin Wolf <kwolf@redhat.com>
Sun, 9 Feb 2014 08:12:39 +0000 (9 09:12 +0100)
treef54ea13923faad1dfd1648355b9db07cc3a7a53c
parentad6aef43d36fe65701ff84193576d7f3dcb82dc5
block: Fix memory leaks in bdrv_co_do_pwritev()

The error path for a failure in one of the two bdrv_aligned_preadv()
calls leaked head_buf or tail_buf, respectively. This fixes the memory
leak.

Reported-by: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
block.c