virtio-gpu: call cleanup mapping function in resource destroy
commitb8e23926c568f2e963af39028b71c472e3023793
authorLi Qiang <liq3ea@gmail.com>
Tue, 29 Nov 2016 02:29:25 +0000 (28 21:29 -0500)
committerGerd Hoffmann <kraxel@redhat.com>
Tue, 3 Jan 2017 14:47:16 +0000 (3 15:47 +0100)
treeb0609d9f7ccb775c8dae5ede4b5a29ae4a24349a
parent9b7621bca2f70dc1a9815d50f05261296a8ae932
virtio-gpu: call cleanup mapping function in resource destroy

If the guest destroy the resource before detach banking, the 'iov'
and 'addrs' field in resource is not freed thus leading memory
leak issue. This patch avoid this.

Signed-off-by: Li Qiang <liq3ea@gmail.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-id: 1480386565-10077-1-git-send-email-liq3ea@gmail.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
hw/display/virtio-gpu.c