* Relative path, so start with the base directory.
*/
path_size += strlen(basedir) + 1; /* +1 for the slash */
- path = malloc(path_size);
- if (!path) log_error(LOG_LEVEL_FATAL, "malloc failed!");
+ path = malloc_or_die(path_size);
strlcpy(path, basedir, path_size);
strlcat(path, "/", path_size);
strlcat(path, dir, path_size);
else
#endif /* defined unix */
{
- path = malloc(path_size);
- if (!path) log_error(LOG_LEVEL_FATAL, "malloc failed!");
+ path = malloc_or_die(path_size);
strlcpy(path, dir, path_size);
}