Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

drm_preview: fix unreleased resources and a typo #584

Merged
merged 1 commit into from
Oct 18, 2023

Conversation

Leuca
Copy link
Contributor

@Leuca Leuca commented Oct 17, 2023

In DrmPreview::findCrtc() a series of drmModeGet*() functions is used. Those functions actually allocate memory that needs to be released with the corresponding drmModeFree*() call. In some cases resources are not freed causing a memory leak which can be confirmed with Valgrind.

Free all the allocated resources before losing the pointer.

Also fix a clear typo.

In DrmPreview::findCrtc() a series of drmModeGet*() functions is used. Those functions actually allocate memory that needs to be released with the corresponding drmModeFree*() call. In some cases resources are not freed causing a memory leak which can be confirmed with Valgrind.

Free all the allocated resources before losing the pointer.

Also fix a clear typo.

Signed-off-by: Luca Magrone <luca@magrone.cc>
@naushir
Copy link
Collaborator

naushir commented Oct 18, 2023

Thank you for this fix. Now merging...

@naushir naushir merged commit 28b2a4f into raspberrypi:main Oct 18, 2023
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants