--- rpl/src/gestion_variables.c 2015/01/28 22:17:39 1.88 +++ rpl/src/gestion_variables.c 2015/01/29 09:33:41 1.89 @@ -2236,14 +2236,18 @@ copie_arbre_variables(struct_processus * s_variable = (*((struct_variable *) (*l_element_courant).donnee)); - if ((s_variable.nom = strdup((*((struct_variable *) - (*l_element_courant).donnee)).nom)) == NULL) + if ((s_variable.nom = malloc((strlen((*((struct_variable *) + (*l_element_courant).donnee)).nom) + 1) * + sizeof(unsigned char))) == NULL) { (*s_nouvel_etat_processus).erreur_systeme = d_es_allocation_memoire; return; } + strcpy(s_variable.nom, (*((struct_variable *) + (*l_element_courant).donnee)).nom); + if ((s_variable.objet = copie_objet(s_nouvel_etat_processus, (*((struct_variable *) (*l_element_courant).donnee)) .objet, 'P')) == NULL)