Skip to content

Commit

Permalink
lwline_from_wkb_state(): fix memory leak
Browse files Browse the repository at this point in the history
  • Loading branch information
rouault committed Jul 2, 2017
1 parent bb2b85a commit cf17939
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions liblwgeom/lwin_wkb.c
Expand Up @@ -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 )
{
Expand Down

0 comments on commit cf17939

Please sign in to comment.