drm/amd/display: fix memory leak when using debugfs_lookup()
authorjsg <jsg@openbsd.org>
Fri, 16 Sep 2022 02:26:35 +0000 (02:26 +0000)
committerjsg <jsg@openbsd.org>
Fri, 16 Sep 2022 02:26:35 +0000 (02:26 +0000)
From Greg Kroah-Hartman
58acd2ebae034db3bacf38708f508fbd12ae2e54 in linux 5.15.y/5.15.68
cbfac7fa491651c57926c99edeb7495c6c1aeac2 in mainline linux

sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c

index 5c9f521..6d694ce 100644 (file)
@@ -3007,7 +3007,7 @@ void crtc_debugfs_init(struct drm_crtc *crtc)
                                   &crc_win_y_end_fops);
        debugfs_create_file_unsafe("crc_win_update", 0644, dir, crtc,
                                   &crc_win_update_fops);
-
+       dput(dir);
 }
 #endif
 /*