Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
model-checker : fix memory leak
[simgrid.git] / src / xbt / ex.c
index c6e74bd..f383208 100644 (file)
@@ -46,6 +46,7 @@
 #include "portable.h"           /* execinfo when available */
 #include "xbt/ex.h"
 #include "xbt/str.h"
+#include "xbt/synchro_core.h"
 #include "xbt_modinter.h"       /* backtrace initialization headers */
 
 #include "xbt/ex_interface.h"
@@ -409,7 +410,7 @@ typedef struct {
 
 static void good_example(void)
 {
-  global_context_t *global_context = malloc(sizeof(global_context_t));
+  global_context_t *global_context = xbt_malloc(sizeof(global_context_t));
 
   /* GOOD_EXAMPLE */
   {                             /*01 */