]> granicus.if.org Git - postgis/commitdiff
Fixed a segfault in transform_geom exploited by proj4's make_project error.
authorSandro Santilli <strk@keybit.net>
Wed, 10 Aug 2005 23:07:06 +0000 (23:07 +0000)
committerSandro Santilli <strk@keybit.net>
Wed, 10 Aug 2005 23:07:06 +0000 (23:07 +0000)
git-svn-id: http://svn.osgeo.org/postgis/branches/pgis_1_0@1861 b70326c6-7e19-0410-871a-916f4a2858ee

lwgeom/lwgeom_transform.c

index 358ebeb7de52b7dda2af44e9fc8fb9016cbfea5d..b207e3394c194ef35e7e28970e2aea57876c0fc4 100644 (file)
@@ -294,7 +294,7 @@ Datum transform_geom(PG_FUNCTION_ARGS)
        input_pj = make_project(input_proj4);
        if ( (input_pj == NULL) || pj_errno)
        {
-               //pfree(input_proj4);
+               pfree(input_proj4);
                pfree(output_proj4);
                pfree(geom);
                elog(ERROR, "transform: couldn't parse proj4 input string: '%s': %s", input_proj4, pj_strerrno(pj_errno));
@@ -305,8 +305,7 @@ Datum transform_geom(PG_FUNCTION_ARGS)
        output_pj = make_project(output_proj4);
        if ((output_pj == NULL)|| pj_errno)
        {
-               pfree(input_proj4);
-               //pfree(output_proj4);
+               pfree(output_proj4);
                pj_free(input_pj);
                pfree(geom);
                elog(ERROR, "transform: couldn't parse proj4 output string: '%s': %s", output_proj4, pj_strerrno(pj_errno));