Description: OsShellCmdTskInfoGet 内存泄露漏洞修复

IssueNo: https://gitee.com/openharmony/kernel_liteos_a/issues/IAM34B?from=project-issue
Feature Or Bugfix: Bugfix
Binary Source: No
Signed-off-by: hw_llm <liu.limin@huawei.com>
This commit is contained in:
hw_llm 2024-08-23 17:33:57 +08:00
parent 5e3a8f11b4
commit b58c6d41f3
1 changed files with 1 additions and 0 deletions

View File

@ -379,6 +379,7 @@ LITE_OS_SEC_TEXT_MINOR UINT32 OsShellCmdTskInfoGet(UINT32 processID, VOID *seqBu
(VOID)memset_s(threadInfo, sizeof(ProcessThreadInfo), 0, sizeof(ProcessThreadInfo));
if (OsGetProcessThreadInfo(processID, threadInfo) != LOS_OK) {
(VOID)LOS_MemFree(m_aucSysMem1, threadInfo);
return LOS_NOK;
}