From 729a8a40c7fb95869d011a93a45816a66b9c9df9 Mon Sep 17 00:00:00 2001 From: jsg Date: Mon, 4 Mar 2024 02:39:09 +0000 Subject: [PATCH] drm/amd/display: Fix memory leak in dm_sw_fini() From Armin Wolf 10c6b90e975358c17856a578419dc449887899c2 in linux-6.6.y/6.6.19 bae67893578d608e35691dcdfa90c4957debf1d3 in mainline linux --- sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c index acc88a45ac3..d747b582f5f 100644 --- a/sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -2251,6 +2251,7 @@ static int dm_sw_fini(void *handle) if (adev->dm.dmub_srv) { dmub_srv_destroy(adev->dm.dmub_srv); + kfree(adev->dm.dmub_srv); adev->dm.dmub_srv = NULL; } -- 2.20.1