Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
plug a memleak
[simgrid.git] / src / simix / smx_action.c
index 4003661164e17bdad4d8b4168241cecd4d678948..0f8221251ed186eb8b320589dd1a536661f2dcdb 100644 (file)
@@ -401,6 +401,7 @@ char *SIMIX_action_get_name(smx_action_t action)
 /** @brief Change the name of the action. Warning, the string you provide is not strdup()ed */
 void SIMIX_action_set_name(smx_action_t action,char *name)
 {
 /** @brief Change the name of the action. Warning, the string you provide is not strdup()ed */
 void SIMIX_action_set_name(smx_action_t action,char *name)
 {
+  xbt_free(action->name);
   action->name = name;
 }
 
   action->name = name;
 }