Skip to content

fix: bug with asdf_ndarray_data_alloc_temp that leaked/orphaned existing internal data#189

Merged
embray merged 2 commits into
asdf-format:mainfrom
embray:ndarray-alloc-temp-leak
May 12, 2026
Merged

fix: bug with asdf_ndarray_data_alloc_temp that leaked/orphaned existing internal data#189
embray merged 2 commits into
asdf-format:mainfrom
embray:ndarray-alloc-temp-leak

Conversation

@embray
Copy link
Copy Markdown
Collaborator

@embray embray commented May 12, 2026

Found specifically in the case of calling
asdf_ndarray_storage_set(...) followed by
asdf_ndarray_data_alloc_temp but could in principle be triggered in other ways. Solution is to simply use the asdf_ndarray_internal(...) helper which is intended for this, not directly allocating a new asdf_ndarray_internal_t.

@embray embray added the bug Something isn't working label May 12, 2026
embray added 2 commits May 12, 2026 11:50
…ing internal data

Found specifically in the case of calling
`asdf_ndarray_storage_set(...)` followed by
`asdf_ndarray_data_alloc_temp` but could in principle be triggered in
other ways.  Solution is to simply use the `asdf_ndarray_internal(...)`
helper which is intended for this, not directly allocating a new
`asdf_ndarray_internal_t`.
@embray embray merged commit d3b0a12 into asdf-format:main May 12, 2026
12 checks passed
@embray embray deleted the ndarray-alloc-temp-leak branch May 12, 2026 10:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant