prevent XFREE from freeing NULL pointer under Freescale MQX
This commit is contained in:
parent
60cddecd9c
commit
42ad70591a
@ -332,8 +332,8 @@
|
|||||||
#include "mutex.h"
|
#include "mutex.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define XMALLOC(s, h, type) (void *)_mem_alloc_system((s))
|
#define XMALLOC(s, h, t) (void *)_mem_alloc_system((s))
|
||||||
#define XFREE(p, h, type) _mem_free(p)
|
#define XFREE(p, h, t) {void* xp = (p); if ((xp)) _mem_free((xp));}
|
||||||
/* Note: MQX has no realloc, using fastmath above */
|
/* Note: MQX has no realloc, using fastmath above */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user