diff --git a/src/ssl_sock.c b/src/ssl_sock.c index acfa15b26..08aa28273 100644 --- a/src/ssl_sock.c +++ b/src/ssl_sock.c @@ -1195,8 +1195,10 @@ static int ssl_sock_load_ocsp(const char *path, SSL_CTX *ctx, struct ckch_store 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;