HDFGroup / hdf4

Official HDF4 Library Repository
Other
12 stars 24 forks source link

Fix memory leaks #702

Closed bmribler closed 3 months ago

bmribler commented 3 months ago
The list of cdf structures were not properly de-allocated, causing memory
leaks.  However, releasing the memory caused a number segfaults in several
tests.

Re-worked the code that increases the size of the cdf list when application
attempts to open more files than the current max number of files that can
be opened at the same time.  This allowed the library to properly release
the allocated memory and eliminated the memory leaks.  Verified with valgrind.
schwehr commented 3 months ago

Minor follow ups from clang tidy... these are just IWYU things. They aren't breaking the build.