Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Use XBT_INFO only after MSG_init, so that log parameters given on the command line...
[simgrid.git] / examples / msg / cloud / masterslave_virtual_machines.c
index 5725935..eb9d072 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007-2013. The SimGrid Team.
+/* Copyright (c) 2007-2014. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -85,6 +85,7 @@ int master_fun(int argc, char *argv[])
 
     XBT_INFO("put %s on %s", pr_name, vm_name);
     MSG_process_create_with_arguments(pr_name, worker_fun, NULL, vm, 2, wrk_argv);
+    xbt_free(vm_name);
   }
 
 
@@ -125,6 +126,7 @@ int master_fun(int argc, char *argv[])
 
     XBT_INFO("put %s on %s", pr_name, vm_name);
     MSG_process_create_with_arguments(pr_name, worker_fun, NULL, vm, 2, wrk_argv);
+    xbt_free(vm_name);
   }
 
   XBT_INFO("Send a task to %d worker process", workers_count * 2);