]> granicus.if.org Git - postgis/commitdiff
Fix leak in cu_geodetic test
authorSandro Santilli <strk@keybit.net>
Wed, 19 Dec 2012 20:52:13 +0000 (20:52 +0000)
committerSandro Santilli <strk@keybit.net>
Wed, 19 Dec 2012 20:52:13 +0000 (20:52 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@10864 b70326c6-7e19-0410-871a-916f4a2858ee

liblwgeom/cunit/cu_geodetic.c

index 9966731f8e3271c5196983e15809a1539139f17b..d154c061a7d6bc3bd9ccbaa5145c58196a4379e1 100644 (file)
@@ -1100,13 +1100,14 @@ static void test_ptarray_contains_point_sphere_iowa(void)
        
        rv = ptarray_contains_point_sphere(pa, &pt_outside, &pt_to_test);
        CU_ASSERT_EQUAL(rv, LW_TRUE);
+
+       lwgeom_free(lwg);
 }
 
 
 static void test_lwgeom_distance_sphere(void)
 {
        LWGEOM *lwg1, *lwg2;
-       GBOX gbox1, gbox2;
        double d;
        SPHEROID s;
 
@@ -1114,9 +1115,6 @@ static void test_lwgeom_distance_sphere(void)
        spheroid_init(&s, 6378137.0, 6356752.314245179498);
        s.a = s.b = s.radius;
 
-       gbox1.flags = gflags(0, 0, 1);
-       gbox2.flags = gflags(0, 0, 1);
-
        /* Line/line distance, 1 degree apart */
        lwg1 = lwgeom_from_wkt("LINESTRING(-30 10, -20 5, -10 3, 0 1)", LW_PARSER_CHECK_NONE);
        lwg2 = lwgeom_from_wkt("LINESTRING(-10 -5, -5 0, 5 0, 10 -5)", LW_PARSER_CHECK_NONE);