From: Raúl Marín Rodríguez Date: Fri, 23 Mar 2018 09:24:00 +0000 (+0000) Subject: Fix memory leak in lwline_chaikin X-Git-Tag: 2.5.0alpha~49 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=78b3d4f31031429068e4ad7cc83776ebc68b8288;p=postgis Fix memory leak in lwline_chaikin Closes https://github.com/postgis/postgis/pull/233 Closes #4053 git-svn-id: http://svn.osgeo.org/postgis/trunk@16485 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/liblwgeom/lwchaikins.c b/liblwgeom/lwchaikins.c index b69c0dd1b..91d6fb062 100644 --- a/liblwgeom/lwchaikins.c +++ b/liblwgeom/lwchaikins.c @@ -102,12 +102,11 @@ static LWLINE* lwline_chaikin(const LWLINE *iline, int n_iterations) { POINTARRAY *pa, *pa_new; int j; + LWLINE *oline; if( lwline_is_empty(iline)) return lwline_clone(iline); - - LWLINE *oline = lwline_construct_empty(iline->srid, FLAGS_GET_Z(iline->flags), FLAGS_GET_M(iline->flags)); pa = iline->points; for (j=0;j