From a56b4764d2773a957658e496b0e2863e27b0bca9 Mon Sep 17 00:00:00 2001 From: lecoanet Date: Tue, 18 Jan 2005 14:53:32 +0000 Subject: 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. --- generic/Geo.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'generic/Geo.c') 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; -- cgit v1.1