aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/glu/sgi/libtess
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/glu/sgi/libtess')
-rw-r--r--mesalib/src/glu/sgi/libtess/mesh.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/mesalib/src/glu/sgi/libtess/mesh.c b/mesalib/src/glu/sgi/libtess/mesh.c
index ae861f864..95f87cdc9 100644
--- a/mesalib/src/glu/sgi/libtess/mesh.c
+++ b/mesalib/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 );