Skip to content

Add missing sam_global_args_free calls.#2274

Merged
whitwham merged 1 commit into
samtools:developfrom
jkbonfield:sam_global_args_free
Oct 21, 2025
Merged

Add missing sam_global_args_free calls.#2274
whitwham merged 1 commit into
samtools:developfrom
jkbonfield:sam_global_args_free

Conversation

@jkbonfield

Copy link
Copy Markdown
Contributor

These are a memory leak if we use e.g. --input-fmt-options decode_md. Some tools still leak if they get errors and return early, but this is true in many other ways too (for example calmd doesn't destroy the thread pool if it gets an error closing fpout; one among many). However I focused on removing memory leaks on successful execution (albeit harmless due to immediately exiting anyway) as it's more likely to trip up testing.

These are a memory leak if we use e.g. --input-fmt-options decode_md.
Some tools still leak if they get errors and return early, but this is
true in many other ways too (for example calmd doesn't destroy the
thread pool if it gets an error closing fpout; one among many).
However I focused on removing memory leaks on successful execution
(albeit harmless due to immediately exiting anyway) as it's more
likely to trip up testing.
@whitwham whitwham self-assigned this Oct 16, 2025
@whitwham whitwham merged commit c22b776 into samtools:develop Oct 21, 2025
6 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.

2 participants