diff options
author | Thomas White <taw@physics.org> | 2020-09-24 10:04:51 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2020-09-24 10:04:51 +0200 |
commit | 96e09f478d7cc4475999b53855b674dfb3a5f6cf (patch) | |
tree | 7b911db07d8c2014ede75d5bbc07ae4d7e28a17b /src | |
parent | c23eefcb9f3663dda4bfa6a7054301eb922cf99d (diff) |
SLURM: Avoid crash when batch system parameters are not set
Diffstat (limited to 'src')
-rw-r--r-- | src/gui_backend_slurm.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gui_backend_slurm.c b/src/gui_backend_slurm.c index 53bee2bc..4ac06a5e 100644 --- a/src/gui_backend_slurm.c +++ b/src/gui_backend_slurm.c @@ -245,15 +245,15 @@ static uint32_t submit_batch_job(const char *geom_filename, slurm_init_job_desc_msg(&job_desc_msg); job_desc_msg.user_id = getuid(); job_desc_msg.group_id = getgid(); - job_desc_msg.mail_user = strdup(email_address); + job_desc_msg.mail_user = safe_strdup(email_address); job_desc_msg.mail_type = MAIL_JOB_FAIL; job_desc_msg.comment = "Submitted via CrystFEL GUI"; job_desc_msg.shared = 0; job_desc_msg.time_limit = 60; - job_desc_msg.partition = strdup(partition); + job_desc_msg.partition = safe_strdup(partition); job_desc_msg.min_nodes = 1; job_desc_msg.max_nodes = 1; - job_desc_msg.name = strdup(job_name); + job_desc_msg.name = safe_strdup(job_name); job_desc_msg.std_err = strdup(stderr_file); job_desc_msg.std_out = strdup(stdout_file); job_desc_msg.work_dir = strdup(workdir); |