Closed keith-rollin closed 8 years ago
Thanks Keith. The memory does leak, but this is intentional for now: at the moment the memory strategy is very inefficient. I'm re-aligning the core s2n_connection struct so that the members can fit in and use a single page and plan on cleaning it all up then.
I'm just eyeballing this so perhaps I'm missing something, but the following code in s2n_realloc seems to leak any old buffer in b->data:
This code was introduced in 3a418cc as part of aligning the data buffer to a page size.
If there is a problem here that needs to be fixed, please also note the other reported issue regarding a lack of a call to munlock when freeing a block.