Skip to content

Commit b0f2133

Browse files
authored
Merge pull request #4026 from Moral-Hao/feature/fix_memheap_detach
fix bug of rt_memheap_detach
2 parents b437478 + b9a1869 commit b0f2133

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)