]> granicus.if.org Git - postgis/commitdiff
Fix memory leak in shapefile loader (#1436)
authorSandro Santilli <strk@keybit.net>
Mon, 9 Jan 2012 10:34:34 +0000 (10:34 +0000)
committerSandro Santilli <strk@keybit.net>
Mon, 9 Jan 2012 10:34:34 +0000 (10:34 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@8709 b70326c6-7e19-0410-871a-916f4a2858ee

loader/shp2pgsql-core.c

index 96987178c07361e998adc9d94b7df1e5ee62a8d4..26b5e0063b315d9c9c6a9e21e5826d82d366e6cd 100644 (file)
@@ -1572,6 +1572,8 @@ ShpLoaderGenerateSQLRowStatement(SHPLOADERSTATE *state, int item, char **strreco
                                        return SHPLOADERERR;
                                }
                                strncpy(val, utf8str, MAXVALUELEN);
+                               free(utf8str);
+
                        }
 
                        /* Escape attribute correctly according to dump format */