Merge pull request #4026 from Moral-Hao/feature/fix_memheap_detach

fix bug of rt_memheap_detach
This commit is contained in:
Bernard Xiong 2020-11-16 23:52:50 +08:00 committed by GitHub
commit b0f2133563
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -127,7 +127,7 @@ rt_err_t rt_memheap_detach(struct rt_memheap *heap)
RT_ASSERT(rt_object_get_type(&heap->parent) == RT_Object_Class_MemHeap); RT_ASSERT(rt_object_get_type(&heap->parent) == RT_Object_Class_MemHeap);
RT_ASSERT(rt_object_is_systemobject(&heap->parent)); 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)); rt_object_detach(&(heap->parent));
/* Return a successful completion. */ /* Return a successful completion. */