==1369== 17 bytes in 1 blocks are definitely lost in loss record 1 of 27
==1369== at 0x4C2DBCD: malloc (vg_replace_malloc.c:299)
==1369== by 0x586E799: strdup (strdup.c:42)
==1369== by 0x4E503AB: get_hashes (in /usr/local/lib/libpe.so.1.0)
==1369== by 0x4E505D2: get_headers_dos_hash (in /usr/local/lib/libpe.so.1.0)
==1369== by 0x4E5078F: get_headers_hash (in /usr/local/lib/libpe.so.1.0)
==1369== by 0x109106: main (in /home/boddu/github/boddumanohar/exe-check)
==1369==
==1369== 18 bytes in 1 blocks are definitely lost in loss record 2 of 27
==1369== at 0x4C2DBCD: malloc (vg_replace_malloc.c:299)
==1369== by 0x586E799: strdup (strdup.c:42)
==1369== by 0x4E503AB: get_hashes (in /usr/local/lib/libpe.so.1.0)
==1369== by 0x4E50646: get_headers_coff_hash (in /usr/local/lib/libpe.so.1.0)
==1369== by 0x4E508BC: get_headers_hash (in /usr/local/lib/libpe.so.1.0)
==1369== by 0x109106: main (in /home/boddu/github/boddumanohar/exe-check)
==1369==
==1369== 25 bytes in 1 blocks are definitely lost in loss record 3 of 27
==1369== at 0x4C2DBCD: malloc (vg_replace_malloc.c:299)
==1369== by 0x586E799: strdup (strdup.c:42)
==1369== by 0x4E503AB: get_hashes (in /usr/local/lib/libpe.so.1.0)
==1369== by 0x4E506E0: get_headers_optional_hash (in /usr/local/lib/libpe.so.1.0)
==1369== by 0x4E5082D: get_headers_hash (in /usr/local/lib/libpe.so.1.0)
==1369== by 0x109106: main (in /home/boddu/github/boddumanohar/exe-check)
==1369==
==1369== 51 bytes in 8 blocks are definitely lost in loss record 5 of 27
==1369== at 0x4C2DBCD: malloc (vg_replace_malloc.c:299)
==1369== by 0x586E799: strdup (strdup.c:42)
==1369== by 0x4E503AB: get_hashes (in /usr/local/lib/libpe.so.1.0)
==1369== by 0x4E50B17: get_sections_hash (in /usr/local/lib/libpe.so.1.0)
==1369== by 0x1092BB: main (in /home/boddu/github/boddumanohar/exe-check)
==1369== 129,173 (24 direct, 129,149 indirect) bytes in 1 blocks are definitely lost in loss record 27 of 27
==1369== at 0x4C2DBCD: malloc (vg_replace_malloc.c:299)
==1369== by 0x4E511DA: imphash_load_imported_functions (in /usr/local/lib/libpe.so.1.0)
==1369== by 0x4E517E7: pe_imphash (in /usr/local/lib/libpe.so.1.0)
==1369== by 0x109E64: main (in /home/boddu/github/boddumanohar/exe-check)
==1369==
The first 4 errror are due to crypto library we are using.
EVP_cleanup();
which we used before exiting calc_hash
will only clean the used memory partially.