From b9a186952cc619bc24ac55d150bca1f52be9c3e2 Mon Sep 17 00:00:00 2001 From: minghao_wang Date: Mon, 16 Nov 2020 15:10:22 +0800 Subject: [PATCH] fix bug of rt_memheap_detach --- src/memheap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/memheap.c b/src/memheap.c index aef56e1a7..0ff692569 100644 --- a/src/memheap.c +++ b/src/memheap.c @@ -126,8 +126,8 @@ rt_err_t rt_memheap_detach(struct rt_memheap *heap) RT_ASSERT(heap); RT_ASSERT(rt_object_get_type(&heap->parent) == RT_Object_Class_MemHeap); RT_ASSERT(rt_object_is_systemobject(&heap->parent)); - - rt_object_detach(&(heap->lock.parent.parent)); + + rt_sem_detach(&heap->lock); rt_object_detach(&(heap->parent)); /* Return a successful completion. */ -- GitLab