-
-
Notifications
You must be signed in to change notification settings - Fork 244
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
Clean up memory allocated when reading messages in H5Dlayout on error (#2602) #2687
Conversation
src/H5Dlayout.c
Outdated
hbool_t layout_copied = FALSE; /* Flag to indicate that layout message was copied */ | ||
herr_t ret_value = SUCCEED; /* Return value */ | ||
htri_t msg_exists; /* Whether a particular type of message exists */ | ||
hbool_t dcpl_cache_pline_copied = FALSE; /* Flag to indicate that dcpl_cache.pline's message was copied */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a small thing, but I would make the naming scheme consistent, probably by dropping the dcpl_cache from the name of this identifier.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would consider making the small change I requested, but otherwise this looks good.
I will make the change. |
Also, please add an entry in release_docs/RELEASE.txt with a short description of the issue and fix. Otherwise this looks good to me. |
Oh yeah, forgot to emphasize that. Should definitely do that. |
… layout_fix Add note to release doc.
release_docs/RELEASE.txt
Outdated
@@ -151,6 +151,12 @@ Bug Fixes since HDF5-1.13.3 release | |||
=================================== | |||
Library | |||
------- | |||
- Fixed memory leaks that could occur when reading a dataset from a malformed file | |||
|
|||
When attempting to read layout, pline, and efl information for a dataset, memory leaks could occur if attempting to read pline/efl information threw an error, which is due to the memory that was allocated for pline and efl not being properly cleaned up on error. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should wrap on 75-ish characters
No description provided.