From: Matthew Fernandez Date: Sat, 27 Aug 2022 22:31:04 +0000 (-0700) Subject: gvpr addBlock: fix unchecked allocation failure X-Git-Tag: 6.0.1~18^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=07a6a0f7c13fb156fa9d1914ad061e01a97f072e;p=graphviz gvpr addBlock: fix unchecked allocation failure --- diff --git a/lib/gvpr/parse.c b/lib/gvpr/parse.c index 3bc3281ba..66e2e062b 100644 --- a/lib/gvpr/parse.c +++ b/lib/gvpr/parse.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include @@ -389,7 +390,7 @@ parseCase(Sfio_t * str, char **guard, int *gline, char **action, static parse_block *addBlock (parse_block * last, char *stmt, int line, int n_nstmts, case_info *nodelist, int n_estmts, case_info *edgelist) { - parse_block* item = newof(0, parse_block, 1, 0); + parse_block* item = gv_alloc(sizeof(parse_block)); item->l_beging = line; item->begg_stmt = stmt;