Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fix in SIMIX_host_add_auto_restart_process
authorSamuel Lepetit <samuel.lepetit@inria.fr>
Thu, 28 Jun 2012 13:48:06 +0000 (15:48 +0200)
committerSamuel Lepetit <samuel.lepetit@inria.fr>
Thu, 28 Jun 2012 13:48:06 +0000 (15:48 +0200)
include/msg/datatypes.h
src/simix/smx_host.c

index 0f0ab9d..4ce5731 100644 (file)
@@ -145,7 +145,5 @@ typedef struct s_smx_process *m_process_t;
 typedef int m_channel_t;
 #endif
 
-
-
 SG_END_DECL()
 #endif
index 248eb91..a8a6d1b 100644 (file)
@@ -210,12 +210,13 @@ void SIMIX_host_add_auto_restart_process(smx_host_t host,
   arg->kill_time = kill_time;
   arg->argc = argc;
 
-  arg->argv = xbt_new(char*,argc);
+  arg->argv = xbt_new(char*,argc + 1);
 
   int i;
   for (i = 0; i < argc; i++) {
     arg->argv[i] = xbt_strdup(argv[i]);
   }
+  arg->argv[argc] = NULL;
 
   arg->properties = properties;
   arg->auto_restart = auto_restart;