From dd04aefc2677db191703f0ec97ff2fa18ca0b0aa Mon Sep 17 00:00:00 2001 From: Paul Ramsey Date: Sat, 25 Feb 2012 05:53:11 +0000 Subject: [PATCH] SPI_finish before dropping out on NULL proj4text git-svn-id: http://svn.osgeo.org/postgis/trunk@9298 b70326c6-7e19-0410-871a-916f4a2858ee --- libpgcommon/lwgeom_transform.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libpgcommon/lwgeom_transform.c b/libpgcommon/lwgeom_transform.c index 39ca504fb..2331d34d7 100644 --- a/libpgcommon/lwgeom_transform.c +++ b/libpgcommon/lwgeom_transform.c @@ -380,6 +380,7 @@ char* GetProj4StringSPI(int srid) } else { + SPI_finish(); pfree(proj_str); return NULL; } @@ -712,7 +713,9 @@ int spheroid_init_from_srid(FunctionCallInfo fcinfo, int srid, SPHEROID *s) { projPJ pj1, pj2; +#if POSTGIS_PROJ_VERSION >= 48 double major_axis, minor_axis, eccentricity_squared; +#endif if ( GetProjectionsUsingFCInfo(fcinfo, srid, srid, &pj1, &pj2) == LW_FAILURE) return LW_FAILURE; -- 2.50.1