Skip to contentSkip to conversation

drm/amdgpu: Dereference the ATCS ACPI buffer

PATCH In review Prike Liang 2 participants 2 messages Oct 17, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amdgpu: Dereference the ATCS ACPI buffer

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

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c +1 -0
index 1f5a296f5ed2..cce85389427f 100644
@@ -800,6 +800,7 @@ int amdgpu_acpi_power_shift_control(struct amdgpu_device *adev,
 		return -EIO;
 	}
 
+	kfree(info);
 	return 0;
 }
 
Signature · 1 line
2.34.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 6 lines · Prike Liang

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

Quoted 19 lines
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c +1 -1
index 1f5a296f5ed2..cce85389427f 100644
@@ -800,6 +800,7 @@ int amdgpu_acpi_power_shift_control(struct amdgpu_device *adev,
                return -EIO;
        }
 
+       kfree(info);
        return 0;
 }
 
--

2.34.1