diff options
| author | yangwei <[email protected]> | 2024-01-29 12:00:36 +0800 |
|---|---|---|
| committer | yangwei <[email protected]> | 2024-01-29 12:00:36 +0800 |
| commit | 59096f0aef41fca216a0038bb19d6bdbd8e58a69 (patch) | |
| tree | d1af00bde3d3f55cccc602ae9733bdc2f2ff9b2d | |
| parent | 7559d0197d827a2d8a3e63ff5890b715c3c96916 (diff) | |
🐞 fix(fix TSG-18782): udp_reset_stream释放内存顺序更新v4.3.37
flow_stat存储在project中,重置流时,需要保证bridge数据先于project被释放
| -rw-r--r-- | src/dealpkt/deal_udp.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/dealpkt/deal_udp.c b/src/dealpkt/deal_udp.c index 58f993d..7bd47dd 100644 --- a/src/dealpkt/deal_udp.c +++ b/src/dealpkt/deal_udp.c @@ -407,11 +407,13 @@ static int udp_reset_stream(struct streamindex *pindex) stream_process_udp(pstream, NULL, NULL, NULL, &(pdetail_pr->apme), &(pstream->opstate)); - project_requirement_destroy(SAPP_MEM_DYN_UDP_PROJECT, threadnum, pstream_pr->pproject); - pstream_pr->pproject = NULL; + stream_bridge_destroy_per_stream(SAPP_MEM_DYN_UDP_BRIDGE, pstream, pstream_pr->stream_bridge); pstream_pr->stream_bridge = NULL; + project_requirement_destroy(SAPP_MEM_DYN_UDP_PROJECT, threadnum, pstream_pr->pproject); + pstream_pr->pproject = NULL; + if(pstream_pr->raw_pkt) { ((raw_pkt_t *)pstream_pr->raw_pkt)->append_list=NULL; |
