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

lib/traverse: Fix minor memory leak #3287

Merged
merged 1 commit into from
Sep 7, 2024

Conversation

cgwalters
Copy link
Member

I was trying to check something with -fsanitize=address and it warned about this memory leak. It's...subtle, basically we were leaking when the same commit was added to the hash table.

But unfortunately fixing that then complicates ownership over the return value; what we really want to use here is g_hash_table_steal_all_keys but RHEL 9.4 is still rocking glib2-2.68.4 so we can't use it.

(Rust would mean we wouldn't have leaked anything here in the
first place...)

@ericcurtin ericcurtin enabled auto-merge August 20, 2024 23:43
I was trying to check something with `-fsanitize=address`
and it warned about this memory leak. It's...subtle, basically
we were leaking when the same commit was added to the hash table.

But unfortunately fixing that then complicates ownership
over the return value; what we really want to use here is
`g_hash_table_steal_all_keys` but RHEL 9.4 is still rocking
`glib2-2.68.4` so we can't use it.

(Rust would mean we wouldn't have leaked anything here in the
 first place...)

Signed-off-by: Colin Walters <[email protected]>
@ericcurtin ericcurtin merged commit 81867f0 into ostreedev:main Sep 7, 2024
24 of 25 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