Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Use xbt_malloc (and friends) instead of direct malloc()
[simgrid.git] / examples / msg / masterslave / masterslave_failure_platfgen.c
index 3a7f226..bba483a 100644 (file)
@@ -328,7 +328,7 @@ int main(int argc, char *argv[])
   msg_host_t host_master = NULL;
   msg_process_t process = NULL;
   xbt_dynar_t host_dynar = MSG_hosts_as_dynar();
-  char** hostname_list = malloc(sizeof(char*) * xbt_dynar_length(host_dynar));
+  char** hostname_list = xbt_malloc(sizeof(char*) * xbt_dynar_length(host_dynar));
 
   xbt_dynar_foreach(host_dynar, i, host) {
     process = MSG_process_create("slave", slave, NULL, host);