代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/wireshark 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 863f6c3dc760ab770a7b31b33e9c769868e4289b Mon Sep 17 00:00:00 2001
From: John Thacker <[email protected]>
Date: Thu, 10 Aug 2023 01:19:21 -0400
Subject: [PATCH] wmem: Fix leak in block_fast when realloc'ing jumbo blocks
In block fast wmem_allocator is used, keep the double linked
list of jumbo blocks accurate by pointing the prev pointer of
the old head (if it exists) to the newly allocated jumbo block.
This prevents a leak if a jumbo block which is not the most
recently added jumbo block is realloc'ed. If the prev pointer
isn't set properly, then all the jumbo blocks added afterwards
will be lost from the list and leaked.
Fix #19259
(cherry picked from commit d086f2733bc611eb310aafec51bd28d44166fa42)
---
wsutil/wmem/wmem_allocator_block_fast.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/wsutil/wmem/wmem_allocator_block_fast.c b/wsutil/wmem/wmem_allocator_block_fast.c
index bdb8c2f75dc..117e9df6193 100644
--- a/wsutil/wmem/wmem_allocator_block_fast.c
+++ b/wsutil/wmem/wmem_allocator_block_fast.c
@@ -97,6 +97,9 @@ wmem_block_fast_alloc(void *private_data, const size_t size)
size + WMEM_JUMBO_HEADER_SIZE + WMEM_CHUNK_HEADER_SIZE);
block->next = allocator->jumbo_list;
+ if (block->next) {
+ block->next->prev = block;
+ }
block->prev = NULL;
allocator->jumbo_list = block;
--
GitLab
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。