HDFGroup / hdf4

Official HDF4 Library Repository
Other
14 stars 25 forks source link

Fix memory leak in mfhdf test #691

Closed bmribler closed 6 months ago

bmribler commented 6 months ago

An incorrect variable was used to detect when the list of opened files became empty and needed to be deallocated. That resulted in a list of allocated pointers not freed.

==154211== still reachable: 8,168 bytes in 1 blocks

After the correct variable was used, valgrind showed the memory leak gone.

==163740== All heap blocks were freed -- no leaks are possible