]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
drm/amdgpu: Dereference the ATCS ACPI buffer
authorPrike Liang <Prike.Liang@amd.com>
Thu, 17 Oct 2024 06:54:31 +0000 (14:54 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 14 Dec 2024 18:54:42 +0000 (19:54 +0100)
[ Upstream commit 32e7ee293ff476c67b51be006e986021967bc525 ]

Need to dereference the atcs acpi buffer after
the method is executed, otherwise it will result in
a memory leak.

Signed-off-by: Prike Liang <Prike.Liang@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c

index 7ad7ebaaa93cdd7a79b91b7241c264ea885b7f14..5fa7f6d8aa309ce4879cc680fcc1e3769eab3e9f 100644 (file)
@@ -758,6 +758,7 @@ int amdgpu_acpi_power_shift_control(struct amdgpu_device *adev,
                return -EIO;
        }
 
+       kfree(info);
        return 0;
 }