drm/amd/display: Fix memory leak in dm_sw_fini()
authorjsg <jsg@openbsd.org>
Mon, 4 Mar 2024 02:39:09 +0000 (02:39 +0000)
committerjsg <jsg@openbsd.org>
Mon, 4 Mar 2024 02:39:09 +0000 (02:39 +0000)
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

index acc88a4..d747b58 100644 (file)
@@ -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;
        }