virtio-gpu-rutabaga.c: override resource_destroy method
commit588a09dace4f9f9163bfdd6426ed3718d166b992
authorManos Pitsidianakis <manos.pitsidianakis@linaro.org>
Tue, 30 Jan 2024 14:59:21 +0000 (30 16:59 +0200)
committerMichael S. Tsirkin <mst@redhat.com>
Wed, 14 Feb 2024 11:17:44 +0000 (14 06:17 -0500)
tree08424ef481336d87fd2eb5d0a38b1176fa851d9e
parent330399bd8935c9c2100c40e168781f405545d05a
virtio-gpu-rutabaga.c: override resource_destroy method

When the Rutabaga GPU device frees resources, it calls
rutabaga_resource_unref for that resource_id. However, when the generic
VirtIOGPU functions destroys resources, it only removes the
virtio_gpu_simple_resource from the device's VirtIOGPU->reslist list.
The rutabaga resource associated with that resource_id is then leaked.

This commit overrides the resource_destroy class method introduced in
the previous commit to fix this.

Signed-off-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Message-Id: <e3778e44c98a35839de2f4938e5355449fa3aa14.1706626470.git.manos.pitsidianakis@linaro.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/display/virtio-gpu-rutabaga.c