From 6f560cd988041046bd5fd88cb345545b5d524e55 Mon Sep 17 00:00:00 2001 From: Sandro Santilli Date: Mon, 29 Jul 2019 13:59:52 +0000 Subject: [PATCH] Fix memory leaks in shp2pgsql git-svn-id: http://svn.osgeo.org/postgis/trunk@17629 b70326c6-7e19-0410-871a-916f4a2858ee --- loader/shp2pgsql-cli.c | 2 ++ loader/shp2pgsql-core.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/loader/shp2pgsql-cli.c b/loader/shp2pgsql-cli.c index 678e91a11..8ab121420 100644 --- a/loader/shp2pgsql-cli.c +++ b/loader/shp2pgsql-cli.c @@ -446,6 +446,8 @@ main (int argc, char **argv) free(config->schema); if (config->table) free(config->table); + if (config->encoding) + free(config->encoding); free(config); return 0; diff --git a/loader/shp2pgsql-core.c b/loader/shp2pgsql-core.c index 8fae746bb..01b59727e 100644 --- a/loader/shp2pgsql-core.c +++ b/loader/shp2pgsql-core.c @@ -1952,6 +1952,8 @@ ShpLoaderDestroy(SHPLOADERSTATE *state) 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); -- 2.40.0