]> granicus.if.org Git - graphviz/commitdiff
common gv_fixLocale: fix unchecked allocation failure
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 15 Oct 2022 18:18:19 +0000 (11:18 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Wed, 19 Oct 2022 04:30:58 +0000 (21:30 -0700)
lib/common/emit.c

index 94099265fc5efd2b9d74d411fd228ed568d59b3e..5f9a5ea8de08a7a6df81516f8b1283e452828771 100644 (file)
@@ -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");
        }
     }