--- lwgeom/lwgeom_functions_basic.c.orig 2007-05-31 06:18:04.000000000 -0700 +++ lwgeom/lwgeom_functions_basic.c 2008-03-27 14:07:58.000000000 -0700 @@ -2726,14 +2726,14 @@ if ( TYPE_GETTYPE(g1->type) != TYPE_GETTYPE(g2->type) ) { PG_FREE_IF_COPY(g1, 0); - PG_FREE_IF_COPY(g2, 0); + PG_FREE_IF_COPY(g2, 1); PG_RETURN_BOOL(FALSE); /* different types */ } if ( TYPE_GETZM(g1->type) != TYPE_GETZM(g2->type) ) { PG_FREE_IF_COPY(g1, 0); - PG_FREE_IF_COPY(g2, 0); + PG_FREE_IF_COPY(g2, 1); PG_RETURN_BOOL(FALSE); /* different dimensions */ }