From ff0d773389c763477b088400c5ac80a80fa0e4bf Mon Sep 17 00:00:00 2001 From: Sandro Santilli Date: Wed, 10 Aug 2005 23:07:06 +0000 Subject: [PATCH] Fixed a segfault in transform_geom exploited by proj4's make_project error. git-svn-id: http://svn.osgeo.org/postgis/branches/pgis_1_0@1861 b70326c6-7e19-0410-871a-916f4a2858ee --- lwgeom/lwgeom_transform.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lwgeom/lwgeom_transform.c b/lwgeom/lwgeom_transform.c index 358ebeb7d..b207e3394 100644 --- a/lwgeom/lwgeom_transform.c +++ b/lwgeom/lwgeom_transform.c @@ -294,7 +294,7 @@ Datum transform_geom(PG_FUNCTION_ARGS) input_pj = make_project(input_proj4); if ( (input_pj == NULL) || pj_errno) { - //pfree(input_proj4); + pfree(input_proj4); pfree(output_proj4); pfree(geom); elog(ERROR, "transform: couldn't parse proj4 input string: '%s': %s", input_proj4, pj_strerrno(pj_errno)); @@ -305,8 +305,7 @@ Datum transform_geom(PG_FUNCTION_ARGS) output_pj = make_project(output_proj4); if ((output_pj == NULL)|| pj_errno) { - pfree(input_proj4); - //pfree(output_proj4); + pfree(output_proj4); pj_free(input_pj); pfree(geom); elog(ERROR, "transform: couldn't parse proj4 output string: '%s': %s", output_proj4, pj_strerrno(pj_errno)); -- 2.40.0