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 830739a..eb9d072 100644 (file)
@@ -1,4 +1,5 @@
-/* Copyright (c) 2007-2012. The SimGrid Team. All rights reserved.                             */
+/* Copyright (c) 2007-2014. The SimGrid Team.
+ * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
@@ -84,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);
   }
 
 
@@ -124,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);