Commit 26bdf5c0 authored by Paul Ramsey's avatar Paul Ramsey
Browse files

Delay freeing input until processing complete. From lucasvr.

References #3980


git-svn-id: http://svn.osgeo.org/postgis/trunk@16563 b70326c6-7e19-0410-871a-916f4a2858ee
parent 17708aa3
Loading
Loading
Loading
Loading
+4 −5
Original line number Diff line number Diff line
@@ -750,7 +750,6 @@ Datum sfcgal_make_solid(PG_FUNCTION_ARGS)
	GSERIALIZED *output;
	GSERIALIZED *input = PG_GETARG_GSERIALIZED_P(0);
	LWGEOM *lwgeom = lwgeom_from_gserialized(input);
	PG_FREE_IF_COPY(input, 0);
	if (! lwgeom)
	{
		elog(ERROR, "sfcgal_make_solid: Unable to deserialize input");
@@ -760,7 +759,7 @@ Datum sfcgal_make_solid(PG_FUNCTION_ARGS)

	output = geometry_serialize( lwgeom );
	lwgeom_free(lwgeom);

	PG_FREE_IF_COPY(input, 0);
	PG_RETURN_POINTER(output);
}