]> granicus.if.org Git - postgis/commitdiff
SPI_finish before dropping out on NULL proj4text
authorPaul Ramsey <pramsey@cleverelephant.ca>
Sat, 25 Feb 2012 05:53:11 +0000 (05:53 +0000)
committerPaul Ramsey <pramsey@cleverelephant.ca>
Sat, 25 Feb 2012 05:53:11 +0000 (05:53 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@9298 b70326c6-7e19-0410-871a-916f4a2858ee

libpgcommon/lwgeom_transform.c

index 39ca504fbe14b220f0731245b46565677bbbddfd..2331d34d70b2a1b5b089fa37ed7e1c014057cde1 100644 (file)
@@ -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;