tass-belgium / picotcp-modules

Application level modules to run on top of the popular Embedded picoTCP TCP/IP stack
GNU General Public License v2.0
8 stars 11 forks source link

HTTP-client: Memleak in libhttp on a new connection #5

Closed robbinvandamme closed 8 years ago

robbinvandamme commented 9 years ago

12bytes get lost per new connection to a http server.

==18192== HEAP SUMMARY: ==18192== in use at exit: 1,053,488 bytes in 74 blocks ==18192== total heap usage: 2,328 allocs, 2,254 frees, 1,448,286 bytes allocated ==18192== ==18192== 120 bytes in 5 blocks are definitely lost in loss record 54 of 68 ==18192== at 0x4C2CC70: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==18192== by 0x423641: segment_from_frame (pico_tcp.c:88) ==18192== by 0x426BE4: tcp_data_in_expected (pico_tcp.c:1604) ==18192== by 0x426F44: tcp_data_in (pico_tcp.c:1682) ==18192== by 0x42956E: tcp_action_call (pico_tcp.c:2712) ==18192== by 0x42962D: tcp_action_by_flags (pico_tcp.c:2726) ==18192== by 0x4297E6: pico_tcp_input (pico_tcp.c:2772) ==18192== by 0x42291B: socket_tcp_do_deliver (pico_socket_tcp.c:183) ==18192== by 0x422AA8: pico_socket_tcp_deliver (pico_socket_tcp.c:220) ==18192== by 0x412C82: pico_socket_transport_deliver (pico_socket.c:525) ==18192== by 0x412D46: pico_socket_deliver (pico_socket.c:553) ==18192== by 0x414F23: pico_transport_process_in (pico_socket.c:1931) ==18192== ==18192== LEAK SUMMARY: ==18192== definitely lost: 120 bytes in 5 blocks ==18192== indirectly lost: 0 bytes in 0 blocks ==18192== possibly lost: 0 bytes in 0 blocks ==18192== still reachable: 1,053,368 bytes in 69 blocks ==18192== suppressed: 0 bytes in 0 blocks ==18192== Reachable blocks (those to which a pointer was found) are not shown. ==18192== To see them, rerun with: --leak-check=full --show-leak-kinds=all ==18192== ==18192== For counts of detected and suppressed errors, rerun with: -v ==18192== ERROR SUMMARY: 13 errors from 13 contexts (suppressed: 0 from 0)

maximevince commented 8 years ago

Fixed in picotcp commit https://github.com/tass-belgium/picotcp/commit/d2b3be9aa7a7483a306206f01d26a31a900cbccb