4
0
mirror of https://github.com/RT-Thread/rt-thread.git synced 2025-01-18 12:53:31 +08:00

fix bug of rt_memheap_detach

This commit is contained in:
minghao_wang 2020-11-16 15:10:22 +08:00
parent 065488e746
commit b9a186952c

View File

@ -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. */