[postgis-tickets] r15038 - Allocate memory for encoding argument, so it can be safely freed later.
Sandro Santilli
strk at kbt.io
Fri Aug 5 07:52:21 PDT 2016
Author: strk
Date: 2016-08-05 07:52:21 -0700 (Fri, 05 Aug 2016)
New Revision: 15038
Modified:
trunk/loader/shp2pgsql-cli.c
Log:
Allocate memory for encoding argument, so it can be safely freed later.
Fixes #3608
Patch by Matt Amos <zerebubuth at gmail.com>
Modified: trunk/loader/shp2pgsql-cli.c
===================================================================
--- trunk/loader/shp2pgsql-cli.c 2016-08-05 14:12:48 UTC (rev 15037)
+++ trunk/loader/shp2pgsql-cli.c 2016-08-05 14:52:21 UTC (rev 15038)
@@ -176,7 +176,7 @@
break;
case 'W':
- config->encoding = pgis_optarg;
+ config->encoding = strdup(pgis_optarg);
break;
case 'N':
More information about the postgis-tickets
mailing list