]> 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:51:38 +0000 (19:51 +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 592ca0cfe61d0b21d6e7516157b4417f25085906..0adc992e4630addbfff0c028c2affe392545d998 100644 (file)
@@ -761,6 +761,7 @@ int amdgpu_acpi_power_shift_control(struct amdgpu_device *adev,
                return -EIO;
        }
 
+       kfree(info);
        return 0;
 }