From: Matthew Fernandez Date: Sat, 15 Oct 2022 18:13:46 +0000 (-0700) Subject: common emit_once: fix unchecked allocation failure X-Git-Tag: 7.0.0~3^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a7884a784fe0acb4445c6133dbb2387bcf0c8bf7;p=graphviz common emit_once: fix unchecked allocation failure --- diff --git a/lib/common/emit.c b/lib/common/emit.c index 97a473d77..94099265f 100644 --- a/lib/common/emit.c +++ b/lib/common/emit.c @@ -3539,7 +3539,7 @@ int emit_once(char *str) if (strings == 0) strings = dtopen(&stringdict, Dtoset); if (!dtsearch(strings, str)) { - dtinsert(strings, strdup(str)); + dtinsert(strings, gv_strdup(str)); return TRUE; } return FALSE;