Closed ashamedbit closed 8 months ago
Thank you very much @ashamedbit ‼️
We plan to release this change in the next version of calc.
We will give you credit, @ashamedbit, in the CHANGES file when calc v2.15.0.6 is released.
Your patch is much appreciated. Fixing memory leaks is VERY IMPORTANT to calc(1)
as some run calc computations that take years to complete where even minor memory leaks can be deadly.
Hello, I am a new contributor to the repository.
I tried to fix following issue: #47 Memory leak on
make clobber all chk
. I was able to reproduce the following leaks which are slightly different from the ones above:The leak occurs in function
zsetrandom
whereblum
is reassigned before freeing. In fact just above the fix lies another patch of code that freesblum
before assigning it. Therefore the patch freesblum
before it is reassigned.After this, the leaks are patched. I was able to verify that the leaks are gone and there is no double free. Let me know if the patch is helpful :)