CHERIoT-Platform / network-stack

5 stars 1 forks source link

Fix memory leak in `host_resolve`. #11

Closed hlef closed 6 months ago

hlef commented 6 months ago

We never free the freertos_addrinfo we get from FreeRTOS_getaddrinfo. Although this is not documented in the FreeRTOS API reference, this buffer should be freed via FreeRTOS_freeaddrinfo.

This is a pretty large allocation (328B), which explains why we run out of memory quickly when doing connects/disconnects in a loop.