virtio-gpu: fix memory leak in virtio_gpu_resource_create_2d
commitcb3a0522b694cc5bb6424497b3f828ccd28fd1dd
authorLi Qiang <liqiang6-s@360.cn>
Mon, 19 Sep 2016 02:07:11 +0000 (18 19:07 -0700)
committerGerd Hoffmann <kraxel@redhat.com>
Wed, 26 Oct 2016 12:52:21 +0000 (26 14:52 +0200)
treed7952e08e976d874cac40fe699a818b4ed7126d9
parentede0cbeb7892bdf4a19128853a3a3c61a17fb068
virtio-gpu: fix memory leak in virtio_gpu_resource_create_2d

In virtio gpu resource create dispatch, if the pixman format is zero
it doesn't free the resource object allocated previously. Thus leading
a host memory leak issue. This patch avoid this.

Signed-off-by: Li Qiang <liqiang6-s@360.cn>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-id: 57df486e.8379240a.c3620.ff81@mx.google.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
hw/display/virtio-gpu.c