artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7250779
)
drm/radeon/dpm: fix a memleak in sumo_parse_power_table
author
jsg
<jsg@openbsd.org>
Mon, 29 Jan 2024 01:36:31 +0000
(
01:36
+0000)
committer
jsg
<jsg@openbsd.org>
Mon, 29 Jan 2024 01:36:31 +0000
(
01:36
+0000)
From Zhipeng Lu
a26634b3ce218ee3a308f2c0e326a1c7d4bb97ec
in linux-6.6.y/6.6.14
0737df9ed0997f5b8addd6e2b9699a8c6edba2e4
in mainline linux
sys/dev/pci/drm/radeon/sumo_dpm.c
patch
|
blob
|
history
diff --git
a/sys/dev/pci/drm/radeon/sumo_dpm.c
b/sys/dev/pci/drm/radeon/sumo_dpm.c
index
f74f381
..
d49c145
100644
(file)
--- a/
sys/dev/pci/drm/radeon/sumo_dpm.c
+++ b/
sys/dev/pci/drm/radeon/sumo_dpm.c
@@
-1493,8
+1493,10
@@
static int sumo_parse_power_table(struct radeon_device *rdev)
non_clock_array_index = power_state->v2.nonClockInfoIndex;
non_clock_info = (struct _ATOM_PPLIB_NONCLOCK_INFO *)
&non_clock_info_array->nonClockInfo[non_clock_array_index];
- if (!rdev->pm.power_state[i].clock_info)
+ if (!rdev->pm.power_state[i].clock_info) {
+ kfree(rdev->pm.dpm.ps);
return -EINVAL;
+ }
ps = kzalloc(sizeof(struct sumo_ps), GFP_KERNEL);
if (ps == NULL) {
kfree(rdev->pm.dpm.ps);