diff --git a/ChangeLog b/ChangeLog index c07772eebe..58b05e8a48 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2016-06-09 Paul Pluzhnikov + + * test-skeleton.c (oom_error, xmalloc, xcalloc, xrealloc): + New functions. + (add_temp_file): Use them. + 2016-06-09 Samuel Thibault name = newname; if (temp_name_list == NULL) @@ -124,13 +169,8 @@ create_temp_file (const char *base, char **filename) char *fname; int fd; - fname = (char *) malloc (strlen (test_dir) + 1 + strlen (base) - + sizeof ("XXXXXX")); - if (fname == NULL) - { - puts ("out of memory"); - return -1; - } + fname = (char *) xmalloc (strlen (test_dir) + 1 + strlen (base) + + sizeof ("XXXXXX")); strcpy (stpcpy (stpcpy (stpcpy (fname, test_dir), "/"), base), "XXXXXX"); fd = mkstemp (fname);