mm: Fix heap corruption in protected build
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
This commit is contained in:
parent
79589eca1a
commit
ad9db974cb
|
@ -211,12 +211,10 @@ struct mm_freenode_s
|
|||
FAR struct mm_freenode_s *blink;
|
||||
};
|
||||
|
||||
#if defined(CONFIG_BUILD_FLAT) || defined(__KERNEL__)
|
||||
struct mm_delaynode_s
|
||||
{
|
||||
struct mm_delaynode_s *flink;
|
||||
};
|
||||
#endif
|
||||
|
||||
/* What is the size of the freenode? */
|
||||
|
||||
|
@ -258,11 +256,9 @@ struct mm_heap_s
|
|||
|
||||
struct mm_freenode_s mm_nodelist[MM_NNODES];
|
||||
|
||||
#if defined(CONFIG_BUILD_FLAT) || defined(__KERNEL__)
|
||||
/* Free delay list, for some situation can't do free immdiately */
|
||||
|
||||
struct mm_delaynode_s *mm_delaylist;
|
||||
#endif
|
||||
};
|
||||
|
||||
/****************************************************************************
|
||||
|
|
|
@ -175,11 +175,9 @@ void mm_initialize(FAR struct mm_heap_s *heap, FAR void *heapstart,
|
|||
heap->mm_nregions = 0;
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_BUILD_FLAT) || defined(__KERNEL__)
|
||||
/* Initialize mm_delaylist */
|
||||
|
||||
heap->mm_delaylist = NULL;
|
||||
#endif
|
||||
|
||||
/* Initialize the node array */
|
||||
|
||||
|
|
Loading…
Reference in New Issue