Unverified Commit 9b0827ba authored by Maxime Ripard's avatar Maxime Ripard
Browse files

drm/tests: modeset: Fix drm_display_mode memory leak



drm_analog_tv_mode() and its variants return a drm_display_mode that
needs to be destroyed later one. The drm_test_pick_cmdline_named() test
never does however, which leads to a memory leak.

Let's make sure it's freed.

Reported-by: default avatarPhilipp Stanner <phasta@mailbox.org>
Closes: https://lore.kernel.org/dri-devel/a7655158a6367ac46194d57f4b7433ef0772a73e.camel@mailbox.org/


Fixes: fedcaf72 ("drm/modes: Properly generate a drm_display_mode from a named mode")
Reviewed-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
Link: https://lore.kernel.org/r/20250408-drm-kunit-drm-display-mode-memleak-v1-3-996305a2e75a@kernel.org


Signed-off-by: default avatarMaxime Ripard <mripard@kernel.org>
parent dacafdcc
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment