We could run under heavy load in containers or on premises and some automatic
tool in parallel could use CLI to check OCSP updates statuses or to upload new
OCSP responses. So, calloc() to store OCSP update callback arguments may fail
and ocsp_tree_lock need to be unlocked, when exiting due to this failure.
This needs to be backported in all stable versions until v2.4.0 included.
EVP_PKEY *pkey;
cb_arg = calloc(1, sizeof(*cb_arg));
- if (!cb_arg)
+ if (!cb_arg) {
+ HA_SPIN_UNLOCK(OCSP_LOCK, &ocsp_tree_lock);
goto out;
+ }
cb_arg->is_single = 1;
cb_arg->s_ocsp = iocsp;