]> granicus.if.org Git - postgis/commitdiff
test_rect_tree_contains_point: Fix memory leaks
authorRaúl Marín Rodríguez <rmrodriguez@carto.com>
Tue, 27 Feb 2018 17:42:55 +0000 (17:42 +0000)
committerRaúl Marín Rodríguez <rmrodriguez@carto.com>
Tue, 27 Feb 2018 17:42:55 +0000 (17:42 +0000)
Closes #4026
Closes https://github.com/postgis/postgis/pull/216

git-svn-id: http://svn.osgeo.org/postgis/trunk@16434 b70326c6-7e19-0410-871a-916f4a2858ee

liblwgeom/cunit/cu_measures.c

index 3da8df8acc8c4949f02f0b5a4d18e141a5b0b325..6ca9d0146b3f3f79a184a2ea9b24352e2909a62c 100644 (file)
@@ -232,6 +232,9 @@ static void test_rect_tree_contains_point(void)
        /* touching hole corner */
        CU_ASSERT_EQUAL(tree_pt(tree, 7, 7), 1);
 
+       rect_tree_free(tree);
+       lwgeom_free(poly);
+
 
        /**********************************************************************
        * polygon with hole and concavities
@@ -267,6 +270,9 @@ static void test_rect_tree_contains_point(void)
        CU_ASSERT_EQUAL(tree_pt(tree, 0.5, 6), 1);
        CU_ASSERT_EQUAL(tree_pt(tree, 0.5, 9), 1);
 
+       rect_tree_free(tree);
+       lwgeom_free(poly);
+
        /**********************************************************************
        * square
        */