From 9bfaadadc0352f6700286cf67ee1bcc453bfa2c3 Mon Sep 17 00:00:00 2001 From: Moe Jette <jette1@llnl.gov> Date: Mon, 14 Jul 2008 18:51:24 +0000 Subject: [PATCH] fix bug in accounting which can result in the slurmstepd aborting with an invalid memory reference --- src/common/jobacct_common.c | 2 ++ testsuite/expect/test1.49 | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/common/jobacct_common.c b/src/common/jobacct_common.c index 847e171f547..08d97a0175a 100644 --- a/src/common/jobacct_common.c +++ b/src/common/jobacct_common.c @@ -830,6 +830,8 @@ extern struct jobacctinfo *jobacct_common_stat_task(pid_t pid) break; } list_iterator_destroy(itr); + if (jobacct == NULL) + goto error; ret_jobacct = xmalloc(sizeof(struct jobacctinfo)); memcpy(ret_jobacct, jobacct, sizeof(struct jobacctinfo)); error: diff --git a/testsuite/expect/test1.49 b/testsuite/expect/test1.49 index fdbc7cfef48..5c8f43fef92 100755 --- a/testsuite/expect/test1.49 +++ b/testsuite/expect/test1.49 @@ -74,7 +74,7 @@ make_bash_script $file_in " # causes the test to fail # set matches 0 -set timeout $max_job_delay +set timeout [expr $max_job_delay + 30] if { [test_bluegene] } { set node_cnt 1-1024 } else { -- GitLab