]> granicus.if.org Git - postgis/commitdiff
Memory leak in lwline_from_wkb_state
authorRegina Obe <lr@pcorp.us>
Sun, 9 Jul 2017 14:35:20 +0000 (14:35 +0000)
committerRegina Obe <lr@pcorp.us>
Sun, 9 Jul 2017 14:35:20 +0000 (14:35 +0000)
Closes #3782 for PostGIS 2.3.4
Patch provided by Even Rouault

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

NEWS
liblwgeom/lwin_wkb.c

diff --git a/NEWS b/NEWS
index d4603086ad5c25b2dcdff5e970fdab6a4c2f6453..f574a38e41d618993e8ca209bedf074b1e60f386 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,14 @@
+PostGIS 2.3.4
+2017/xx/xx
+
+  * Bug Fixes
+
+  - #3782, Memory leak in lwline_from_wkb_state
+           (Even Rouault)
+
+
+
+
 PostGIS 2.3.3
 2017/07/01
 
index 35539dc8e63d15e559467a1d3f3f3fb78eb3ad1b..4cac75357ed0e17d8fa04fd119bb64a27b6baa6f 100644 (file)
@@ -441,7 +441,10 @@ static LWLINE* lwline_from_wkb_state(wkb_parse_state *s)
        POINTARRAY *pa = ptarray_from_wkb_state(s);
 
        if( pa == NULL || pa->npoints == 0 )
+       {
+               ptarray_free(pa);
                return lwline_construct_empty(s->srid, s->has_z, s->has_m);
+       }
 
        if( s->check & LW_PARSER_CHECK_MINPOINTS && pa->npoints < 2 )
        {