From 07a6a0f7c13fb156fa9d1914ad061e01a97f072e Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Sat, 27 Aug 2022 15:31:04 -0700 Subject: [PATCH] gvpr addBlock: fix unchecked allocation failure --- lib/gvpr/parse.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; -- 2.50.1