use xmalloc_atomic for many pointerless objects
[bpt/emacs.git] / src / gtkutil.c
index e3d4406..558b727 100644 (file)
@@ -498,7 +498,7 @@ get_utf8_string (const char *str)
       len = strlen (str);
       if ((min (PTRDIFF_MAX, SIZE_MAX) - len - 1) / 4 < nr_bad)
        memory_full (SIZE_MAX);
-      up = utf8_str = xmalloc (len + nr_bad * 4 + 1);
+      up = utf8_str = xmalloc_atomic (len + nr_bad * 4 + 1);
       p = (unsigned char *)str;
 
       while (! (cp = g_locale_to_utf8 ((char *)p, -1, &bytes_read,