]> git.ipfire.org Git - thirdparty/kernel/linux.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)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 22 Oct 2024 21:51:19 +0000 (17:51 -0400)
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>
drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c

index 1f5a296f5ed2f4773fe35293049a7262a0c46ecc..cce85389427f3530dc4970d1ca058bb03ba27970 100644 (file)
@@ -800,6 +800,7 @@ int amdgpu_acpi_power_shift_control(struct amdgpu_device *adev,
                return -EIO;
        }
 
+       kfree(info);
        return 0;
 }