Merge pull request #514 from BastianPoe/contiki-mmem1
mmem: Prevent duplicate init of mmem
This commit is contained in:
commit
61ec5bf896
@ -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 New Issue
Block a user