!391 补充内存释放函数和去除多余参数。

Merge pull request !391 from pef/OpenHarmony-3.0-LTS
This commit is contained in:
openharmony_ci 2021-11-25 08:33:08 +00:00 committed by Gitee
commit a338ba8f69
2 changed files with 3 additions and 5 deletions

View File

@ -74,7 +74,6 @@ LITE_OS_SEC_TEXT_MINOR STATIC VOID OsShellCmdTskInfoData(const LosTaskCB *allTas
{ {
const LosTaskCB *taskCB = NULL; const LosTaskCB *taskCB = NULL;
UINT32 loop; UINT32 loop;
UINT32 semId;
#if (LOSCFG_TASK_MEM_USED == 1) #if (LOSCFG_TASK_MEM_USED == 1)
UINT32 arraySize = sizeof(UINT32) * (LOSCFG_BASE_CORE_TSK_LIMIT + 1); UINT32 arraySize = sizeof(UINT32) * (LOSCFG_BASE_CORE_TSK_LIMIT + 1);
@ -93,17 +92,15 @@ LITE_OS_SEC_TEXT_MINOR STATIC VOID OsShellCmdTskInfoData(const LosTaskCB *allTas
continue; continue;
} }
semId = OsGetSemID(taskCB);
PRINTK("%-23s%-20p0x%-5x", taskCB->taskName, taskCB->taskEntry, taskCB->taskID); PRINTK("%-23s%-20p0x%-5x", taskCB->taskName, taskCB->taskEntry, taskCB->taskID);
#if (LOSCFG_TASK_MEM_USED == 1) #if (LOSCFG_TASK_MEM_USED == 1)
PRINTK("%-11u%-13s0x%-11x 0x%-11x 0x%-8x 0x%-10x ", taskCB->priority, PRINTK("%-11u%-13s0x%-11x 0x%-11x 0x%-8x 0x%-10x ", taskCB->priority,
OsConvertTskStatus(taskCB->taskStatus), getUsedSizeArray[loop], taskCB->stackSize, OsConvertTskStatus(taskCB->taskStatus), getUsedSizeArray[loop], taskCB->stackSize,
taskCB->stackPointer, taskCB->topOfStack, semId); taskCB->stackPointer, taskCB->topOfStack);
#else #else
PRINTK("%-11u%-13s0x%-11x 0x%-8x 0x%-10x ", taskCB->priority, PRINTK("%-11u%-13s0x%-11x 0x%-8x 0x%-10x ", taskCB->priority,
OsConvertTskStatus(taskCB->taskStatus), taskCB->stackSize, OsConvertTskStatus(taskCB->taskStatus), taskCB->stackSize,
taskCB->stackPointer, taskCB->topOfStack, semId); taskCB->stackPointer, taskCB->topOfStack);
#endif #endif
PRINTK("\n"); PRINTK("\n");
} }

View File

@ -276,6 +276,7 @@ int OsShellCmdCat(int argc, const char **argv)
if (fd == -1) { if (fd == -1) {
ret = -1; ret = -1;
free(fullpath);
return ret; return ret;
} }