[postgis-tickets] r16709 - MVT: Fix resource leak when the first geometry is NULL
Raul
raul at rmr.ninja
Wed Aug 29 02:28:08 PDT 2018
Author: algunenano
Date: 2018-08-29 02:28:08 -0700 (Wed, 29 Aug 2018)
New Revision: 16709
Modified:
branches/2.5/NEWS
branches/2.5/postgis/mvt.c
Log:
MVT: Fix resource leak when the first geometry is NULL
References #4163
Modified: branches/2.5/NEWS
===================================================================
--- branches/2.5/NEWS 2018-08-29 09:17:33 UTC (rev 16708)
+++ branches/2.5/NEWS 2018-08-29 09:28:08 UTC (rev 16709)
@@ -3,6 +3,7 @@
New since PostGIS 2.5.0rc1
- #4162, ST_DWithin documentation examples for storing geometry and
radius in table (Darafei Praliaskouski, github user Boscop).
+ - #4163, MVT: Fix resource leak when the first geometry is NULL (Raúl Marín)
PostGIS 2.5.0rc1
2018/08/19
Modified: branches/2.5/postgis/mvt.c
===================================================================
--- branches/2.5/postgis/mvt.c 2018-08-29 09:17:33 UTC (rev 16708)
+++ branches/2.5/postgis/mvt.c 2018-08-29 09:28:08 UTC (rev 16709)
@@ -894,6 +894,7 @@
ctx->bool_values_hash = NULL;
ctx->values_hash_i = 0;
ctx->keys_hash_i = 0;
+ ctx->geom_index = UINT32_MAX;
memset(&ctx->column_cache, 0, sizeof(ctx->column_cache));
@@ -936,7 +937,7 @@
POSTGIS_DEBUGF(3, "mvt_agg_transfn new_capacity: %zd", new_capacity);
}
- if (layer->n_features == 0)
+ if (ctx->geom_index == UINT32_MAX)
parse_column_keys(ctx);
datum = GetAttributeByNum(ctx->row, ctx->geom_index + 1, &isnull);
More information about the postgis-tickets
mailing list