aboutsummaryrefslogtreecommitdiff
path: root/generic/Geo.c
diff options
context:
space:
mode:
authorlecoanet2005-01-18 14:53:32 +0000
committerlecoanet2005-01-18 14:53:32 +0000
commita56b4764d2773a957658e496b0e2863e27b0bca9 (patch)
tree14b193df163adc4faab60a059738bdab1710f7ee /generic/Geo.c
parenta3d6f9cf8c4b2212ad9482619a14c0726a6ea017 (diff)
downloadtkzinc-a56b4764d2773a957658e496b0e2863e27b0bca9.zip
tkzinc-a56b4764d2773a957658e496b0e2863e27b0bca9.tar.gz
tkzinc-a56b4764d2773a957658e496b0e2863e27b0bca9.tar.bz2
tkzinc-a56b4764d2773a957658e496b0e2863e27b0bca9.tar.xz
Fixed a big memory leak in Geo.c related to polys and tristrips.
Fixed a typo in the find closest command related to atomic groups.
Diffstat (limited to 'generic/Geo.c')
-rw-r--r--generic/Geo.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/generic/Geo.c b/generic/Geo.c
index ed33e4b..8ee530a 100644
--- a/generic/Geo.c
+++ b/generic/Geo.c
@@ -91,8 +91,7 @@ ZnPolyFree(ZnPoly *poly)
ZnFree(poly->contours[i].controls);
}*/
}
- if ((poly->contours != &poly->contour1) &&
- (poly->num_contours > 1)) {
+ if (poly->contours != &poly->contour1) {
ZnFree(poly->contours);
}
poly->num_contours = 0;
@@ -121,8 +120,7 @@ ZnTriFree(ZnTriStrip *tristrip)
for (i = 0; i < tristrip->num_strips; i++) {
ZnFree(tristrip->strips[i].points);
}
- if ((tristrip->strips != &tristrip->strip1) &&
- (tristrip->num_strips > 1)) {
+ if (tristrip->strips != &tristrip->strip1) {
ZnFree(tristrip->strips);
}
tristrip->num_strips = 0;