Skip to content

Commit f5a8703

Browse files
Yang Yingliangmlankhorst
authored andcommitted
drm/nouveau/debugfs: fix file release memory leak
When using single_open() for opening, single_release() should be called, otherwise the 'op' allocated in single_open() will be leaked. Fixes: 6e9fc17 ("drm/nouveau/debugfs: add copy of sysfs pstate interface ported to debugfs") Reported-by: Hulk Robot <[email protected]> Signed-off-by: Yang Yingliang <[email protected]> Reviewed-by: Karol Herbst <[email protected]> Signed-off-by: Karol Herbst <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Signed-off-by: Maarten Lankhorst <[email protected]>
1 parent 0b3d494 commit f5a8703

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/gpu/drm/nouveau/nouveau_debugfs.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,7 @@ static const struct file_operations nouveau_pstate_fops = {
207207
.open = nouveau_debugfs_pstate_open,
208208
.read = seq_read,
209209
.write = nouveau_debugfs_pstate_set,
210+
.release = single_release,
210211
};
211212

212213
static struct drm_info_list nouveau_debugfs_list[] = {

0 commit comments

Comments
 (0)