diff options
Diffstat (limited to 'third_party/glu')
-rw-r--r-- | third_party/glu/README.skia | 3 | ||||
-rw-r--r-- | third_party/glu/libtess/mesh.c | 7 |
2 files changed, 9 insertions, 1 deletions
diff --git a/third_party/glu/README.skia b/third_party/glu/README.skia index a6b10d9240..40aad35031 100644 --- a/third_party/glu/README.skia +++ b/third_party/glu/README.skia @@ -42,3 +42,6 @@ The following changes were made in order to incorporate this code: - In sweep.c, added explicit cast to GLfloat in VertexWeights() to silence compiler complaint + + - In mesh.c in method __gl_meshMakeEdge, added memory cleanup when + MakeEdge failed diff --git a/third_party/glu/libtess/mesh.c b/third_party/glu/libtess/mesh.c index 7305fab1d2..2b84003f39 100644 --- a/third_party/glu/libtess/mesh.c +++ b/third_party/glu/libtess/mesh.c @@ -291,7 +291,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 ); |