aboutsummaryrefslogtreecommitdiffstats
path: root/src/glu
diff options
context:
space:
mode:
authorVinson Lee <[email protected]>2009-11-22 01:45:53 -0500
committerVinson Lee <[email protected]>2009-11-22 01:45:53 -0500
commitd3b4c99c703f70a9d0e715a97e52672f7f8fc980 (patch)
tree97837b2f0ea27b8ea4957fdfd633be008ac2e979 /src/glu
parent57d389aab5ea4462475756c0e262f3cb543f889d (diff)
glu: Fix memory leak in __gl_meshMakeEdge.
Diffstat (limited to 'src/glu')
-rw-r--r--src/glu/sgi/libtess/mesh.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/glu/sgi/libtess/mesh.c b/src/glu/sgi/libtess/mesh.c
index ae861f86428..95f87cdc949 100644
--- a/src/glu/sgi/libtess/mesh.c
+++ b/src/glu/sgi/libtess/mesh.c
@@ -284,7 +284,12 @@ GLUhalfEdge *__gl_meshMakeEdge( GLUmesh *mesh )
}
e = MakeEdge( &mesh->eHead );
- if (e == NULL) return NULL;
+ if (e == NULL) {
+ memFree(newVertex1);
+ memFree(newVertex2);
+ memFree(newFace);
+ return NULL;
+ }
MakeVertex( newVertex1, e, &mesh->vHead );
MakeVertex( newVertex2, e->Sym, &mesh->vHead );