diff options
Diffstat (limited to 'posix/tst-preadwrite.c')
-rw-r--r-- | posix/tst-preadwrite.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/posix/tst-preadwrite.c b/posix/tst-preadwrite.c index d1dcdcc67c..9d97609836 100644 --- a/posix/tst-preadwrite.c +++ b/posix/tst-preadwrite.c @@ -59,6 +59,8 @@ do_prepare (int argc, char *argv[]) name_len = strlen (test_dir); name = malloc (name_len + sizeof (FNAME)); + if (name == NULL) + error (EXIT_FAILURE, errno, "cannot allocate file name"); mempcpy (mempcpy (name, test_dir, name_len), FNAME, sizeof (FNAME)); add_temp_file (name); |