Skip to content

Commit

Permalink
Fix svc_init() to unlock upon returning a failure
Browse files Browse the repository at this point in the history
Coverity CID 130080 (#1 of 1): Missing unlock (LOCK)

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
  • Loading branch information
Malahal Naineni authored and mattbenjamin committed Sep 2, 2015
1 parent 8cfc6e3 commit 2442f97
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/svc.c
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,10 @@ svc_init(svc_init_params *params)
__svc_params->ioq.thrd_max = 200;

/* uses ioq.thrd_max */
if (svc_work_pool_init())
if (svc_work_pool_init()) {
mutex_unlock(&__svc_params->mtx);
return false;
}

if (params->gss_ctx_hash_partitions)
__svc_params->gss.ctx_hash_partitions =
Expand Down

0 comments on commit 2442f97

Please sign in to comment.