mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-10 04:48:04 +09:00
UPSTREAM: drm/virtio: Remove incorrect kfree()
The virtio_gpu_output is a member of struct virtio_gpu_device
and is not a dynamically-allocated chunk, so it's wrong to kfree() it.
Removing it fixes a memory corruption BUG() that can be triggered
when the virtio-gpu driver is removed.
Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20190102175507.4653-1-ezequiel@collabora.com
(cherry picked from commit 29cd2e2dac)
Signed-off-by: Greg Hartman <ghartman@google.com>
BUG: 139386237
Change-Id: I57b78b049cecc5b8e89ea191dfa807e3725085ca
This commit is contained in:
committed by
Alistair Delva
parent
c77fa1b8fc
commit
c1b2cd0cfb
@@ -243,12 +243,8 @@ static enum drm_connector_status virtio_gpu_conn_detect(
|
||||
|
||||
static void virtio_gpu_conn_destroy(struct drm_connector *connector)
|
||||
{
|
||||
struct virtio_gpu_output *virtio_gpu_output =
|
||||
drm_connector_to_virtio_gpu_output(connector);
|
||||
|
||||
drm_connector_unregister(connector);
|
||||
drm_connector_cleanup(connector);
|
||||
kfree(virtio_gpu_output);
|
||||
}
|
||||
|
||||
static const struct drm_connector_funcs virtio_gpu_connector_funcs = {
|
||||
|
||||
Reference in New Issue
Block a user