virtio-gpu: fix unmap the already mapped items
commiteb398a54e33ab2ac9701839be9b660af3e50a32e
authorLi Zhijian <lizhijian@cn.fujitsu.com>
Thu, 27 Aug 2020 03:58:55 +0000 (27 11:58 +0800)
committerGerd Hoffmann <kraxel@redhat.com>
Fri, 4 Sep 2020 08:12:56 +0000 (4 10:12 +0200)
treea620afa598519e5e6210c7724ff6956f591795f4
parent67a7bfe560a1bba59efab085cb3430f45176d382
virtio-gpu: fix unmap the already mapped items

we go here either (!(*iov)[i].iov_base) or (len != l), so we need to consider
to unmap the 'i'th item as well when the 'i'th item is not nil

CC: Li Qiang <liq3ea@gmail.com>
Signed-off-by: Li Zhijian <lizhijian@cn.fujitsu.com>
Message-id: 20200827035855.24354-1-lizhijian@cn.fujitsu.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
hw/display/virtio-gpu.c