Memory leaks in system.certificates implementation due to possible exception. Example:
https://github.com/ClickHouse/ClickHouse/pull/37142/files#diff-1e24e43bfc38cec9770c3cc831b14d045c8138a60d7b77de8d32d96f4a2387e7R110

ref #37142
{
    std::unordered_set<std::string> ret;
    boost::split(ret, dir, boost::is_any_of(":"), boost::token_compress_on);
    return ret;
}
static void populateTable(const X509 * cert, MutableColumns & res_columns, const std::string & path, bool def)
{
    BIO * b = BIO_new(BIO_s_mem());
    size_t col = 0;
    res_columns[col++]->insert(X509_get_version(cert) + 1);
    {
        char buf[1024] = {0};
        const ASN1_INTEGER * sn = cert->cert_info->serialNumber;
        BIGNUM * bnsn = ASN1_INTEGER_to_BN(sn, nullptr);
        if (BN_print(b, bnsn) > 0 && BIO_read(b, buf, sizeof(buf)) > 0)
            res_columns[col]->insert(buf);
        else
            res_columns[col]->insertDefault();
        BN_free(bnsn);
    }
    ++col;
    {
        const ASN1_BIT_STRING *sig = nullptr;
        const X509_ALGOR *al = nullptr;
        char buf[1024] = {0};
        X509_get0_signature(&sig, &al, cert);
        if (al)
        {
            OBJ_obj2txt(buf, sizeof(buf), al->algorithm, 0);
            res_columns[col]->insert(buf);