diff options
author | Fábio Depin <fabio@seti.com.br> | 2025-06-24 04:48:34 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-06-24 09:48:34 +0200 |
commit | c2526cffc103b736f638200bdc88b9e9e605d3ca (patch) | |
tree | 5202ac8d482a10995761e903a53d6592050e244e /src/lib/protocols/mysql.c | |
parent | 86c591af6abb92448863d03d659aa430beb8f61d (diff) |
Fix stats memory reuse and cleanup across duration loops in ndpiReader (#2903) (#2904)
Refactored stats allocation and reset logic to avoid segmentation faults
when running ndpiReader in live_capture mode with the -m (duration) option.
- Introduced ndpi_stats_init(), ndpi_stats_reset(), and ndpi_stats_free()
to encapsulate lifecycle management of stats.
- Applied these functions in ndpiReader.c and reader_util.{c,h}.
- Prevented multiple allocations and ensured safe reuse of cumulative_stats
and per-thread stats structures between capture iterations.
Fixes: https://github.com/ntop/nDPI/issues/2903
Diffstat (limited to 'src/lib/protocols/mysql.c')
0 files changed, 0 insertions, 0 deletions