projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
57d389a
)
glu: Fix memory leak in __gl_meshMakeEdge.
author
Vinson Lee
<vlee@vmware.com>
Sun, 22 Nov 2009 06:45:53 +0000
(
01:45
-0500)
committer
Vinson Lee
<vlee@vmware.com>
Sun, 22 Nov 2009 06:45:53 +0000
(
01:45
-0500)
src/glu/sgi/libtess/mesh.c
patch
|
blob
|
history
diff --git
a/src/glu/sgi/libtess/mesh.c
b/src/glu/sgi/libtess/mesh.c
index ae861f864288d350d11283386bb89e244ab791e5..95f87cdc9499dd118d80986137a9ddfcc46fe7b1 100644
(file)
--- 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 );