Skip to content

Commit b9a1869

Browse files
committed
fix bug of rt_memheap_detach
1 parent 065488e commit b9a1869

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/memheap.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,8 @@ rt_err_t rt_memheap_detach(struct rt_memheap *heap)
126126
RT_ASSERT(heap);
127127
RT_ASSERT(rt_object_get_type(&heap->parent) == RT_Object_Class_MemHeap);
128128
RT_ASSERT(rt_object_is_systemobject(&heap->parent));
129-
130-
rt_object_detach(&(heap->lock.parent.parent));
129+
130+
rt_sem_detach(&heap->lock);
131131
rt_object_detach(&(heap->parent));
132132

133133
/* Return a successful completion. */

0 commit comments

Comments
 (0)