]> AND Public Git Repository - simgrid.git/blobdiff - src/xbt/mmalloc/mm_legacy.c
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Avoid buffer overflow.
[simgrid.git] / src / xbt / mmalloc / mm_legacy.c
index 7523018d3a01463e7e4990a8af19f8f7cd441a55..d3c6cb731adc7fc13df25a8de83ad0d54eb224ec 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010-2019. The SimGrid Team.
+/* Copyright (c) 2010-2020. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -117,7 +117,7 @@ XBT_ATTRIB_CONSTRUCTOR(101) static void mm_legacy_constructor()
   if (mm_initialized)
     return;
   mm_initializing = 1;
-  __malloc_use_mmalloc = getenv(MC_ENV_VARIABLE) ? 1 : 0;
+  __malloc_use_mmalloc = getenv(MC_ENV_SOCKET_FD) ? 1 : 0;
   if (__malloc_use_mmalloc) {
     __mmalloc_current_heap = mmalloc_preinit();
   } else {