[postgis-tickets] r17629 - Fix memory leaks in shp2pgsql
Sandro Santilli
strk at kbt.io
Mon Jul 29 06:59:53 PDT 2019
Author: strk
Date: 2019-07-29 06:59:52 -0700 (Mon, 29 Jul 2019)
New Revision: 17629
Modified:
trunk/loader/shp2pgsql-cli.c
trunk/loader/shp2pgsql-core.c
Log:
Fix memory leaks in shp2pgsql
Modified: trunk/loader/shp2pgsql-cli.c
===================================================================
--- trunk/loader/shp2pgsql-cli.c 2019-07-29 13:35:43 UTC (rev 17628)
+++ trunk/loader/shp2pgsql-cli.c 2019-07-29 13:59:52 UTC (rev 17629)
@@ -446,6 +446,8 @@
free(config->schema);
if (config->table)
free(config->table);
+ if (config->encoding)
+ free(config->encoding);
free(config);
return 0;
Modified: trunk/loader/shp2pgsql-core.c
===================================================================
--- trunk/loader/shp2pgsql-core.c 2019-07-29 13:35:43 UTC (rev 17628)
+++ trunk/loader/shp2pgsql-core.c 2019-07-29 13:59:52 UTC (rev 17629)
@@ -1952,6 +1952,8 @@
free(state->precisions);
if (state->col_names)
free(state->col_names);
+ if (state->geo_col)
+ free(state->geo_col);
/* Free any column map fieldnames if specified */
colmap_clean(&state->column_map);
More information about the postgis-tickets
mailing list