Skip to content

Fix memory leak in bass.c - #1477

Merged
flyingmutant merged 1 commit into
cmus:masterfrom
chggr:fix-memory-leak
Jan 5, 2026
Merged

flyingmutant merged 1 commit into
cmus:masterfrom
chggr:fix-memory-leak

Conversation

@chggr

@chggr chggr commented Dec 12, 2025

Copy link
Copy Markdown
Contributor

Method encode_ascii_string() allocates memory which is then duplicated in comments_add_const() but is never freed.

@pgaskin
pgaskin self-requested a review December 13, 2025 03:29

@pgaskin pgaskin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

encode_ascii_string calls xmalloc, comments_add_const calls xstrdup.

@flyingmutant
flyingmutant merged commit 058e69a into cmus:master Jan 5, 2026
@chggr
chggr deleted the fix-memory-leak branch January 5, 2026 22:28
@cybersnow02

Copy link
Copy Markdown

Beside this memory leak, the BASS implementation is incomplete. See this issue: #1496

@BrewTestBot BrewTestBot mentioned this pull request Oct 28, 2026
1 task done
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.

4 participants