]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drm/qxl: prevent memory leak
authorZongmin Zhou <zhouzongmin@kylinos.cn>
Tue, 1 Aug 2023 02:53:09 +0000 (10:53 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 28 Nov 2023 16:56:21 +0000 (16:56 +0000)
commite48a5e78d077d068bc8d066944a979119b6db387
tree656c7b9ed162d22ff820b90c0bfec612e41f6232
parent0835e7f296ca98d4ca1a37642718bf7ba4802980
drm/qxl: prevent memory leak

[ Upstream commit 0e8b9f258baed25f1c5672613699247c76b007b5 ]

The allocated memory for qdev->dumb_heads should be released
in qxl_destroy_monitors_object before qxl suspend.
otherwise,qxl_create_monitors_object will be called to
reallocate memory for qdev->dumb_heads after qxl resume,
it will cause memory leak.

Signed-off-by: Zongmin Zhou <zhouzongmin@kylinos.cn>
Link: https://lore.kernel.org/r/20230801025309.4049813-1-zhouzongmin@kylinos.cn
Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Maxime Ripard <mripard@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/qxl/qxl_display.c