Salome HOME
Correct some memory leaks
[modules/smesh.git] / src / DriverMED / DriverMED_W_SMESHDS_Mesh.cxx
index 5665790..1c602e3 100644 (file)
@@ -573,12 +573,12 @@ void DriverMED_W_SMESHDS_Mesh::Add()
                                /* allocation memoire */
                                connectivite =
                                        (med_int *) malloc(sizeof(med_int) * taille * nmailles[i]);
                                /* allocation memoire */
                                connectivite =
                                        (med_int *) malloc(sizeof(med_int) * taille * nmailles[i]);
-                               nomele =
+                               /* nomele =
                                        (char *)malloc(sizeof(char) * MED_TAILLE_PNOM *
                                        (char *)malloc(sizeof(char) * MED_TAILLE_PNOM *
-                                       nmailles[i] + 1);
+                                       nmailles[i] + 1);*/
+                               nomele = "";
                                numele = (med_int *) malloc(sizeof(med_int) * nmailles[i]);
                                nufael = (med_int *) malloc(sizeof(med_int) * nmailles[i]);
                                numele = (med_int *) malloc(sizeof(med_int) * nmailles[i]);
                                nufael = (med_int *) malloc(sizeof(med_int) * nmailles[i]);
-                               nomele = "";
                                nbNodes = typmai[i] % 100;
 
                                for (j = 0; j < nmailles[i]; j++)
                                nbNodes = typmai[i] % 100;
 
                                for (j = 0; j < nmailles[i]; j++)
@@ -637,7 +637,6 @@ void DriverMED_W_SMESHDS_Mesh::Add()
                                /* liberation memoire */
                                free(connectivite);
                                free(numele);
                                /* liberation memoire */
                                free(connectivite);
                                free(numele);
-                               free(nomele);
                                free(nufael);
                                MESSAGE(" End " << typmai[i]);
                        }
                                free(nufael);
                                MESSAGE(" End " << typmai[i]);
                        }