Commit ae6f8ec3 authored by Raúl Marín's avatar Raúl Marín

MVT: Fix resource leak when the first geometry is NULL

Closes #4163


git-svn-id: http://svn.osgeo.org/postgis/trunk@16710 b70326c6-7e19-0410-871a-916f4a2858ee
parent 351176d9
Pipeline #28934897 passed with stage
in 23 minutes and 13 seconds
PostGIS 3.0.0
2019/xx/xx
* Enhancements *
* Enhancements and fixes *
- #4153, ST_Segmentize now splits segments proportionally (Darafei
Praliaskouski).
- #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
......
......@@ -894,6 +894,7 @@ void mvt_agg_init_context(mvt_agg_context *ctx)
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 @@ void mvt_agg_transfn(mvt_agg_context *ctx)
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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment