diff options
| author | minghao_wang <[email protected]> | 2020-11-16 15:10:22 +0800 |
|---|---|---|
| committer | minghao_wang <[email protected]> | 2020-11-16 15:10:22 +0800 |
| commit | b9a186952cc619bc24ac55d150bca1f52be9c3e2 (patch) | |
| tree | da4eb86f0a5a8b1d953d8ee6f65c3917d83cfdbd /src/memheap.c | |
| parent | 065488e74652806a9f58055d5fbb644fda338ae5 (diff) | |
fix bug of rt_memheap_detach
Diffstat (limited to 'src/memheap.c')
| -rw-r--r-- | src/memheap.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/memheap.c b/src/memheap.c index aef56e1a74..0ff6925696 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. */ |
