Skip to content
Snippets Groups Projects
Commit b39a99eb authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

fix mem leaks

parent a587b8ce
No related branches found
No related tags found
No related merge requests found
...@@ -2211,13 +2211,17 @@ static List_T *GetCompoundUniqueEdges(Surface *ps) ...@@ -2211,13 +2211,17 @@ static List_T *GetCompoundUniqueEdges(Surface *ps)
static List_T* GetOrderedUniqueEdges(Surface *s) static List_T* GetOrderedUniqueEdges(Surface *s)
{ {
List_T* unique = GetCompoundUniqueEdges(s); List_T* unique = GetCompoundUniqueEdges(s);
if(!unique) return 0;
// need to sort out the list into ordered, oriented loops before passing // need to sort out the list into ordered, oriented loops before passing
// these into the gmsh geometry system. // these into the gmsh geometry system.
// Have to get list of surface numbers // Have to get list of surface numbers
int numgen = List_Nbr(unique); int numgen = List_Nbr(unique);
if(!numgen) return 0; if(!numgen){
List_Delete(unique);
return 0;
}
List_T *gen_nums = List_Create(numgen, 1, sizeof(int)); List_T *gen_nums = List_Create(numgen, 1, sizeof(int));
...@@ -2256,7 +2260,6 @@ static List_T* GetOrderedUniqueEdges( Surface *s ) ...@@ -2256,7 +2260,6 @@ static List_T* GetOrderedUniqueEdges( Surface *s )
static int compareTwoPoints(const void *a, const void *b) static int compareTwoPoints(const void *a, const void *b)
{ {
Vertex *q = *(Vertex **)a; Vertex *q = *(Vertex **)a;
Vertex *w = *(Vertex **)b; Vertex *w = *(Vertex **)b;
......
...@@ -711,5 +711,9 @@ int GeomMeshMatcher::match(GModel *geom, GModel *mesh) ...@@ -711,5 +711,9 @@ int GeomMeshMatcher::match(GModel *geom, GModel *mesh)
copy_vertices(geom, mesh, _mesh_to_geom,coresp_v,coresp_e,coresp_f); copy_vertices(geom, mesh, _mesh_to_geom,coresp_v,coresp_e,coresp_f);
copy_elements(geom, mesh, _mesh_to_geom,coresp_v,coresp_e,coresp_f); copy_elements(geom, mesh, _mesh_to_geom,coresp_v,coresp_e,coresp_f);
delete coresp_v;
delete coresp_e;
delete coresp_f;
return 1; return 1;
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment