summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryangwei <[email protected]>2024-08-06 15:32:24 +0800
committerluwenpeng <[email protected]>2024-08-12 15:45:50 +0800
commitee695957205fceb7990d123f6cccf7de3e58c12c (patch)
treecff6be4ba71c5f6325087ac8383f96d0782d0b36
parent5eb1f98a213966f8e9ff4ad8851f937816862771 (diff)
🐞 fix(packet init): init packet need free as 0
-rw-r--r--src/stellar/stellar_core.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/stellar/stellar_core.cpp b/src/stellar/stellar_core.cpp
index 465998a..7af49d9 100644
--- a/src/stellar/stellar_core.cpp
+++ b/src/stellar/stellar_core.cpp
@@ -162,6 +162,8 @@ static void *work_thread(void *arg)
uint16_t thr_idx = thread->idx;
__thread_id = thr_idx;
+ memset(packets, 0, sizeof(packets));
+
snprintf(thd_name, sizeof(thd_name), "stellar:%d", thr_idx);
prctl(PR_SET_NAME, (unsigned long long)thd_name, NULL, NULL, NULL);