-
Notifications
You must be signed in to change notification settings - Fork 41
Fix memory leaks in hashes.c #18
Comments
Openssl wikipage has solution for this https://wiki.openssl.org/index.php/Library_Initialization#Cleanup |
Thanks! Would you send a PR to fix the As for the crypto, I moved the crypto/ssl initialization and cleanup to |
I just checked with the lastest revision of our demo file with the latest commit libpe/master (99175e92). Valgrind still shows me the above errors. I would love to send a PR to fix the |
I believe those leaks aren't related to the SSL cleanup though. At least I don't see any reference that points to it. Btw, in the last 2 commits I did rename some types from hashes.h. I updated the demo as well - During the week(end) I plan to do some renames related to resources too. |
Yeah they all are gone now. :D |
After the pull #19 the Valgrind's Memcheck output for our demo code shows:
So now, after this, the entire demo code is free from memory leaks. |
Awesome! Thank you!! 🥇 👍 |
Valgrind shows memory leaks at 5 places in file:
The first 4 errror are due to crypto library we are using.
EVP_cleanup();
which we used before exitingcalc_hash
will only clean the used memory partially.And the last one is because, we are not freeing the linked list (where
head
variable is the head of the linked list). Each node is added after each call toimphash_load_imported_functions
function.The text was updated successfully, but these errors were encountered: