summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorlijia <[email protected]>2021-12-07 11:48:33 +0800
committerlijia <[email protected]>2021-12-07 11:48:33 +0800
commit280431401be73faa905ea6045aa59bd86d12395b (patch)
treedc68d42240fd7212851b52c0c0f713420d154d3c /src/common
parent2a7916d23838eafdb279dc0a3a64b5752421a8ac (diff)
支持-d读包模式不退出进程, 便于插件测试;
解决重复调用getopt()时, optind没有重置为1的BUG; 解决-d -p timestamp模式, 初始时间差值没有初始化的BUG;
Diffstat (limited to 'src/common')
-rw-r--r--src/common/sapp_mem.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/common/sapp_mem.c b/src/common/sapp_mem.c
index e6c6f9f..be7787b 100644
--- a/src/common/sapp_mem.c
+++ b/src/common/sapp_mem.c
@@ -99,7 +99,8 @@ void *sapp_mem_calloc(sapp_mem_type_t type, int thread_seq, int size)
#if USE_MEMPOOL
if(g_sapp_mem_use_dictator){
- ptr = __dictator_malloc(thread_seq, size+sizeof(sapp_private_mem_t));
+ ptr = __dictator_malloc(thread_seq, size+sizeof(sapp_private_mem_t));
+ memset(ptr, 0, size+sizeof(sapp_private_mem_t));
}else{
ptr = (char *)calloc(1, size+sizeof(sapp_private_mem_t));
}