{
struct fpre_keyword *f;
char copy[PATH_MAX];
- size_t dst_left = PATH_MAX;
+ size_t dst_left = PATH_MAX - 1;
if (!o->filename_format || !strlen(o->filename_format)) {
sprintf(buf, "%s.%d.%d", jobname, jobnum, filenum);
case FIO_GETOPT_IOENGINE: {
const char *opt = l_opts[lidx].name;
char *val = optarg;
+
+ if (!td)
+ break;
+
ret = fio_cmd_ioengine_option_parse(td, opt, val);
break;
}
backend = 1;
break;
case 'D':
+ if (pid_file)
+ free(pid_file);
pid_file = strdup(optarg);
break;
case 'I':