Merge pull request #514 from BastianPoe/contiki-mmem1
mmem: Prevent duplicate init of mmem
This commit is contained in:
commit
61ec5bf896
1 changed files with 5 additions and 0 deletions
|
@ -151,8 +151,13 @@ mmem_free(struct mmem *m)
|
|||
void
|
||||
mmem_init(void)
|
||||
{
|
||||
static int inited = 0;
|
||||
if(inited) {
|
||||
return;
|
||||
}
|
||||
list_init(mmemlist);
|
||||
avail_memory = MMEM_SIZE;
|
||||
inited = 1;
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
|
|
Loading…
Reference in a new issue