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

Fix possible memory leak in Settings #1580

Merged
merged 1 commit into from
Jan 4, 2025

Conversation

peter15914
Copy link
Contributor

The pointer returned by vasprintf() should be passed to free() to release the allocated storage when it is no longer needed.
There were two return statements without previous freeing tmpFilename.

@peter15914 peter15914 marked this pull request as ready for review January 3, 2025 08:36
@BenBE BenBE added bug 🐛 Something isn't working code quality ♻️ Code quality enhancement labels Jan 4, 2025
@BenBE BenBE added this to the 3.4.0 milestone Jan 4, 2025
@BenBE BenBE merged commit 8990cc5 into htop-dev:main Jan 4, 2025
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something isn't working code quality ♻️ Code quality enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants