From: Matthew Fernandez Date: Sat, 15 Oct 2022 18:18:19 +0000 (-0700) Subject: common gv_fixLocale: fix unchecked allocation failure X-Git-Tag: 7.0.0~3^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=cf651672eb3f7aa609d53bec9c63c7f97c632c7b;p=graphviz common gv_fixLocale: fix unchecked allocation failure --- diff --git a/lib/common/emit.c b/lib/common/emit.c index 94099265f..5f9a5ea8d 100644 --- a/lib/common/emit.c +++ b/lib/common/emit.c @@ -3985,7 +3985,7 @@ void gv_fixLocale (int set) if (set) { cnt++; if (cnt == 1) { - save_locale = strdup (setlocale (LC_NUMERIC, NULL)); + save_locale = gv_strdup(setlocale (LC_NUMERIC, NULL)); setlocale (LC_NUMERIC, "C"); } }