From: Matthew Fernandez Date: Fri, 2 Sep 2022 01:01:04 +0000 (-0700) Subject: smyrna clear_selpoly: simplify some 'free' code X-Git-Tag: 6.0.1~13^2~21 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9cde3fe0516814f870177de46c558d8b84c552bd;p=graphviz smyrna clear_selpoly: simplify some 'free' code --- diff --git a/cmd/smyrna/selectionfuncs.c b/cmd/smyrna/selectionfuncs.c index b96d8b54f..184b44d01 100644 --- a/cmd/smyrna/selectionfuncs.c +++ b/cmd/smyrna/selectionfuncs.c @@ -235,7 +235,8 @@ void deselect_all(Agraph_t* g) void clear_selpoly(glCompPoly* sp) { - sp->pts=realloc(sp->pts,0); + free(sp->pts); + sp->pts = NULL; sp->cnt=0; } static int close_poly(glCompPoly* selPoly,glCompPoint pt)