fix leak of lock
This commit is contained in:
parent
9b6a91a89e
commit
efafcdc6e9
1 changed files with 10 additions and 0 deletions
|
|
@ -239,6 +239,11 @@ static int dispatch_a_job_(cluster_t* c, endpoint_t* ep, xce_job_alloc_t* alloc)
|
|||
|
||||
rc = get_queue_exec(c, j->job.submit->queue, &q_pre_exec, &q_post_exec);
|
||||
if (rc < 0) {
|
||||
unlock(w);
|
||||
dereference(w);
|
||||
dereference(j);
|
||||
free_launchinfo(&launchinfo);
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
|
@ -322,6 +327,9 @@ int job_ctrl(cluster_t* c, xce_jobctrl_t* ctrinfo)
|
|||
unlock(c->workermgr);
|
||||
|
||||
if (rc < 0) {
|
||||
unlock(j);
|
||||
dereference(j);
|
||||
|
||||
return rc;
|
||||
}
|
||||
if (w != NULL) {
|
||||
|
|
@ -917,6 +925,8 @@ int update_job_rusages(cluster_t* c, endpoint_t* ep, xce_request_t* request)
|
|||
|
||||
w = get_ep_worker(c, ep);
|
||||
if (w == NULL) {
|
||||
dereference(j);
|
||||
|
||||
return errno;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue