From febebd92eea54ce749cba8b11afe4dcc20dbd95c Mon Sep 17 00:00:00 2001 From: Moe Jette <jette1@llnl.gov> Date: Mon, 23 Jun 2008 18:55:55 +0000 Subject: [PATCH] relocate some initialization for avoid segv on error condition --- src/slurmctld/job_mgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/slurmctld/job_mgr.c b/src/slurmctld/job_mgr.c index a97ac05521f..12c1b87e1f8 100644 --- a/src/slurmctld/job_mgr.c +++ b/src/slurmctld/job_mgr.c @@ -1895,6 +1895,7 @@ static int _job_create(job_desc_msg_t * job_desc, int allocate, int will_run, uint16_t conn_type; #endif + *job_pptr = (struct job_record *) NULL; /* find selected partition */ if (job_desc->partition) { part_ptr = list_find_first(part_list, &list_find_part, @@ -1963,7 +1964,6 @@ static int _job_create(job_desc_msg_t * job_desc, int allocate, int will_run, job_desc->min_nodes, job_desc->max_nodes, job_desc->num_procs, max_procs); - *job_pptr = (struct job_record *) NULL; if ((error_code = _validate_job_desc(job_desc, allocate, submit_uid))) return error_code; -- GitLab