Skip to content
Snippets Groups Projects
Commit bc810beb authored by Morris Jette's avatar Morris Jette
Browse files

Add extra error checking

make sure that a job has a step_list before creating an interator for it
parent 3518d3ab
No related branches found
No related tags found
No related merge requests found
...@@ -252,6 +252,9 @@ delete_step_record (struct job_record *job_ptr, uint32_t step_id) ...@@ -252,6 +252,9 @@ delete_step_record (struct job_record *job_ptr, uint32_t step_id)
xassert(job_ptr); xassert(job_ptr);
error_code = ENOENT; error_code = ENOENT;
if (!job_ptr->step_list)
return error_code;
step_iterator = list_iterator_create (job_ptr->step_list); step_iterator = list_iterator_create (job_ptr->step_list);
last_job_update = time(NULL); last_job_update = time(NULL);
while ((step_ptr = (struct step_record *) list_next (step_iterator))) { while ((step_ptr = (struct step_record *) list_next (step_iterator))) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment