From: Matthew Fernandez Date: Sun, 4 Sep 2022 19:34:47 +0000 (-0700) Subject: core plugin insert: fix unchecked allocation failure X-Git-Tag: 6.0.1~9^2~4 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c04355973402adf8481b38884037e1660efe8a77;p=graphviz core plugin insert: fix unchecked allocation failure --- diff --git a/plugin/core/gvrender_core_json.c b/plugin/core/gvrender_core_json.c index 560337fcc..4b7438bb8 100644 --- a/plugin/core/gvrender_core_json.c +++ b/plugin/core/gvrender_core_json.c @@ -34,8 +34,6 @@ #include #include -#include - typedef enum { FORMAT_JSON, FORMAT_JSON0, @@ -615,7 +613,7 @@ static void insert (Dt_t* map, char* name, int v) agerr(AGWARN, "Duplicate cluster name \"%s\"\n", name); return; } - ip = calloc(1, sizeof(intm)); + ip = gv_alloc(sizeof(intm)); ip->id = strdup(name); ip->v = v; dtinsert (map, ip);