X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/d81d8f30c940ed28ed4b2f0e3d8107f1a43093c8..49b15c3b9199c232861be518bb9ab3017341d462:/src/xbt/mmalloc/mm_legacy.c diff --git a/src/xbt/mmalloc/mm_legacy.c b/src/xbt/mmalloc/mm_legacy.c index d6df507dee..4d46fd6a5d 100644 --- a/src/xbt/mmalloc/mm_legacy.c +++ b/src/xbt/mmalloc/mm_legacy.c @@ -7,6 +7,7 @@ /* Redefine the classical malloc/free/realloc functions so that they fit well in the mmalloc framework */ #include "mmprivate.h" +#include "gras_config.h" static void *__mmalloc_current_heap = NULL; /* The heap we are currently using. */ @@ -81,6 +82,9 @@ void *realloc(void *p, size_t s) void free(void *p) { void *mdp = __mmalloc_current_heap; +#ifdef HAVE_GTNETS + if(!mdp) return; +#endif LOCK(mdp); mfree(mdp, p); UNLOCK(mdp);