Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
s/free/xbt_free/ and hope to hide bogus report from codacy.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Mon, 9 Apr 2018 13:18:49 +0000 (15:18 +0200)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Mon, 9 Apr 2018 13:34:47 +0000 (15:34 +0200)
src/xbt/automaton/automatonparse_promela.c

index 93e793a..939bfe9 100644 (file)
@@ -33,7 +33,7 @@ static void new_state(char* id, int src){
       type = -1;
     }
   }
       type = -1;
     }
   }
-  free(id_copy);
+  xbt_free(id_copy);
 
   xbt_automaton_state_t state = xbt_automaton_state_exists(parsed_automaton, id);
   if(state == NULL){
 
   xbt_automaton_state_t state = xbt_automaton_state_exists(parsed_automaton, id);
   if(state == NULL){
@@ -45,7 +45,7 @@ static void new_state(char* id, int src){
 
   if(src) {
     if (state_id_src)
 
   if(src) {
     if (state_id_src)
-      free(state_id_src);
+      xbt_free(state_id_src);
     state_id_src = xbt_strdup(id);
   }
 }
     state_id_src = xbt_strdup(id);
   }
 }