]> granicus.if.org Git - postgis/commitdiff
Avoid pfree'ing the result of getenv
authorRaúl Marín Rodríguez <rmrodriguez@carto.com>
Thu, 13 Jun 2019 07:44:49 +0000 (07:44 +0000)
committerRaúl Marín Rodríguez <rmrodriguez@carto.com>
Thu, 13 Jun 2019 07:44:49 +0000 (07:44 +0000)
Closes #4327

git-svn-id: http://svn.osgeo.org/postgis/branches/2.3@17525 b70326c6-7e19-0410-871a-916f4a2858ee

NEWS
raster/rt_pg/rtpostgis.c

diff --git a/NEWS b/NEWS
index db4833045a8b75871fb22352f2d96bb7e69898fa..3844555d5c31ffce46e416acc4333921a9bd53e2 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -6,6 +6,7 @@ PostGIS 2.3.10
   - #4361, Fix postgis_type_name with (GEOMETRYM,3) (Matt Bretl)
   - #4326, Fix circular arc distance calculation (Paul Ramsey)
   - #4388, AddRasterConstraints: Ignore NULLs when generating constraints (Raúl Marín)
+  - #4327, Avoid pfree'ing the result of getenv (Raúl Marín)
 
 
 PostGIS 2.3.9
index 215fa6eddcd8b5c392ec9681e08e14b7e4f6e3ac..fdc803183bcab58c2b27dcbfbe450233ea2e5652 100644 (file)
@@ -468,7 +468,8 @@ _PG_init(void) {
                if (strcmp(env, "1") == 0)
                        boot_postgis_enable_outdb_rasters = true;
 
-               pfree(env);
+               if (env != env_postgis_enable_outdb_rasters)
+                       pfree(env);
        }
        POSTGIS_RT_DEBUGF(
                4,