In ssl_sock_init(), if we fail to allocate the BIO, don't forget to free
the SSL *, or we'd end up with a memory leak.
This should be backported to 2.1 and 2.0.
}
ctx->bio = BIO_new(ha_meth);
if (!ctx->bio) {
+ SSL_free(ctx->ssl);
+ ctx->ssl = NULL;
if (may_retry--) {
pool_gc(NULL);
goto retry_connect;
}
ctx->bio = BIO_new(ha_meth);
if (!ctx->bio) {
+ SSL_free(ctx->ssl);
+ ctx->ssl = NULL;
if (may_retry--) {
pool_gc(NULL);
goto retry_accept;