mirror of https://github.com/OISF/suricata
stream-tcp: fix error handling in segment pool
When TcpSegmentPoolInit fails (e.g. because of a too low memcap), it would free the segment. However, the segment memory is managed by the Pool API, which would also free the same memory location. This patch fixes that. Also, memset the structure before any checks are done, as the segment memory is passed to TcpSegmentPoolCleanup in case of error as well. Bug #1108pull/855/head
parent
9442dce451
commit
7e38347d99
Loading…
Reference in New Issue