From 154c1afcb55df441312354c128be5928364869d1 Mon Sep 17 00:00:00 2001 From: ttliang Date: Thu, 7 Aug 2025 16:54:09 +0800 Subject: [PATCH] fix: bug of memory leakage Issue: https://gitee.com/openharmony/communication_ipc/issues/ICRVQZ Signed-off-by: ttliang Change-Id: I6badd177d8932ed7fa525f7926973089cd20589d --- ipc/native/src/core/framework/source/ipc_workthread.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ipc/native/src/core/framework/source/ipc_workthread.cpp b/ipc/native/src/core/framework/source/ipc_workthread.cpp index 56cdb8f6..820f2524 100644 --- a/ipc/native/src/core/framework/source/ipc_workthread.cpp +++ b/ipc/native/src/core/framework/source/ipc_workthread.cpp @@ -181,8 +181,10 @@ bool IPCWorkThread::Start(int policy, int proto, int threadIndex) ZLOGD(LOG_LABEL, "create thread, policy:%{public}d proto:%{public}d", policy, proto); if (pthread_detach(threadId) != 0) { ZLOGE(LOG_LABEL, "detach error"); + delete param; return false; } + delete param; return true; } #ifdef CONFIG_IPC_SINGLE -- Gitee