Details
Description
We found various memory leaks, none are per-transaction. And we found an uninitialized variable (for internal requests.) All found with valgrind.
I will attach a patch with fixes for all of them except for one which looked like the following:
=15923== 23 bytes in 1 blocks are definitely lost in loss record 105 of
360==15923== at 0x4022BF3: malloc (in
/usr/local/lib/valgrind/vgpreload_memcheck-x86-linux.so)
==15923== by 0x838BAAC: ink_malloc (ink_memory.cc:213)
==15923== by 0x839C2DD: Tokenizer::addToken(char*, int) (Tokenizer.cc:244)
==15923== by 0x839CA98: Tokenizer::Initialize(char*, int) (Tokenizer.cc:227)
==15923== by 0x839CC4F: Tokenizer::Initialize(char const*) (Tokenizer.cc:95)
==15923== by 0x8379BC3: RecTree::rec_tree_insert(char const*, char const*)
(RecTree.cc:104)
==15923== by 0x8379C60: RecTree::rec_tree_insert(char const*, char const*)
(RecTree.cc:142)
==15923== by 0x837A6E4: RecAlloc(RecT, char const*, RecDataT)
(RecUtils.cc:52)
==15923== by 0x83741F8: register_record(RecT, char const*, RecDataT,
RecData, bool) (RecCore.cc:68)
==15923== by 0x83742A5: RecRegisterStat(RecT, char const*, RecDataT,
RecData, RecPersistT) (RecCore.cc:750)
==15923== by 0x8375B85: RecRegisterRawStat(RecRawStatBlock*, RecT, char
const*, RecDataT, RecPersistT, int, int (char const*, RecDataT, RecData*,
RecRawStatBlock*, int)) (RecProcess.cc:428)
==15923== by 0x83437E3: ink_net_init(ModuleVersion) (Net.cc:69)