OSDN Git Service

virtio-gpu: move iov free to virtio_gpu_cleanup_mapping_iov
authorGerd Hoffmann <kraxel@redhat.com>
Tue, 15 Sep 2015 07:23:14 +0000 (09:23 +0200)
committerGerd Hoffmann <kraxel@redhat.com>
Thu, 8 Oct 2015 08:31:35 +0000 (10:31 +0200)
commit7f3be0f20ff8d976ab982cc06026cac0600f1fb6
treed0dd824378e0c3d14a3244536d073be4631520d6
parent06020b950c0a6a73cbee0527af846b05679c937a
virtio-gpu: move iov free to virtio_gpu_cleanup_mapping_iov

For symmetry reasons: virtio_gpu_create_mapping_iov() allocates it so
virtio_gpu_cleanup_mapping_iov() should free it, otherwise it's easy to
miss a free() needed and leak memory.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
hw/display/virtio-gpu.c