From e10c9af86f42d80af80b38d90974058a178e2174 Mon Sep 17 00:00:00 2001 From: likailong Date: Wed, 23 Dec 2020 16:34:37 +0800 Subject: [PATCH] Description: fix mutex unlock error Reviewed-by: zhangfanfan --- kernel/base/vm/los_vm_syscall.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kernel/base/vm/los_vm_syscall.c b/kernel/base/vm/los_vm_syscall.c index a8f85eec..11e8c2fc 100644 --- a/kernel/base/vm/los_vm_syscall.c +++ b/kernel/base/vm/los_vm_syscall.c @@ -186,7 +186,8 @@ VOID *LOS_DoBrk(VOID *addr) (VOID)LOS_MuxAcquire(&space->regionMux); if ((UINTPTR)alignAddr >= space->mapBase) { VM_ERR("Process heap memory space is insufficient"); - return (VOID *)-ENOMEM; + ret = (VOID *)-ENOMEM; + goto REGION_ALLOC_FAILED; } if (space->heapBase == space->heapNow) { region = LOS_RegionAlloc(space, space->heapBase, size,