--- rpl/src/gestion_variables.c 2012/10/05 13:12:39 1.60 +++ rpl/src/gestion_variables.c 2012/10/07 21:57:48 1.62 @@ -237,7 +237,7 @@ liste_variables_par_feuilles(struct_proc ================================================================================ */ -static inline struct_arbre_variables * +struct_arbre_variables * allocation_noeud(struct_processus *s_etat_processus) { struct_arbre_variables *objet; @@ -272,7 +272,7 @@ liberation_noeud(struct_processus *s_eta return; } -static inline struct_arbre_variables ** +struct_arbre_variables ** allocation_tableau_noeuds(struct_processus *s_etat_processus) { struct_arbre_variables **objet; @@ -1712,6 +1712,8 @@ liberation_arbre_variables(struct_proces free((*(*l_element_statique_courant).variable).nom); liberation(s_etat_processus, (*(*l_element_statique_courant) .variable).objet); + free((*l_element_statique_courant).variable); + free(l_element_statique_courant); l_element_statique_courant = l_element_statique_suivant; } @@ -2184,6 +2186,13 @@ copie_arbre_variables(struct_processus * { (*s_etat_processus).erreur_systeme = d_es_allocation_memoire; return; + } + + if (copie_objet(s_etat_processus, (*(*l_element_statique_courant) + .variable).objet, 'P') == NULL) + { + (*s_etat_processus).erreur_systeme = d_es_allocation_memoire; + return; } l_element_statique_courant = (*l_element_statique_courant).suivant;