[postgis-tickets] r17524 - Avoid pfree'ing the result of getenv

Raul raul at rmr.ninja
Thu Jun 13 12:44:05 PDT 2019


Author: algunenano
Date: 2019-06-13 00:44:05 -0700 (Thu, 13 Jun 2019)
New Revision: 17524

Modified:
   branches/2.4/NEWS
   branches/2.4/raster/rt_pg/rtpostgis.c
Log:
Avoid pfree'ing the result of getenv

References #4327



Modified: branches/2.4/NEWS
===================================================================
--- branches/2.4/NEWS	2019-06-13 07:43:24 UTC (rev 17523)
+++ branches/2.4/NEWS	2019-06-13 07:44:05 UTC (rev 17524)
@@ -6,6 +6,7 @@
   - #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.4.7

Modified: branches/2.4/raster/rt_pg/rtpostgis.c
===================================================================
--- branches/2.4/raster/rt_pg/rtpostgis.c	2019-06-13 07:43:24 UTC (rev 17523)
+++ branches/2.4/raster/rt_pg/rtpostgis.c	2019-06-13 07:44:05 UTC (rev 17524)
@@ -468,7 +468,8 @@
 		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,



More information about the postgis-tickets mailing list