apps/ciphers.c:159: error: INTEGER_OVERFLOW_L1
  (0 - 1):unsigned64 by call to `SSL_new`.
Showing all 17 steps of the trace


apps/ciphers.c:150:11: Call
148.           goto end;
149.   
150.       ctx = SSL_CTX_new(meth);
                 ^
151.       if (ctx == NULL)
152.           goto err;

ssl/ssl_lib.c:1732:21: Call
  1730.       ret->app_verify_cookie_cb = 0;
  1731.   
  1732.       ret->sessions = lh_SSL_SESSION_new();
                              ^
  1733.       if (ret->sessions == NULL)
  1734.           goto err;

crypto/lhash/lhash.c:132:5: Assignment
    130.       ret->up_load = UP_LOAD;
    131.       ret->down_load = DOWN_LOAD;
    132.       ret->num_items = 0;
               ^
    133.   
    134.       ret->num_expands = 0;

apps/ciphers.c:159:11: Call
157.           }
158.       }
159.       ssl = SSL_new(ctx);
                 ^
160.       if (ssl == NULL)
161.           goto err;

ssl/ssl_lib.c:267:1: Parameter `ctx->sessions->num_items`
  265.   }
  266.   
  267. > SSL *SSL_new(SSL_CTX *ctx)
  268.   {
  269.       SSL *s;

ssl/ssl_lib.c:379:10: Call
  377.       s->server = (ctx->method->ssl_accept == ssl_undefined_function) ? 0 : 1;
  378.   
  379.       if (!SSL_clear(s))
                  ^
  380.           goto err;
  381.   

ssl/ssl_lib.c:197:1: Parameter `s->ctx->sessions->num_items`
    195.   }
    196.   
    197. > int SSL_clear(SSL *s)
    198.   {
    199.       if (s->method == NULL) {

ssl/ssl_lib.c:204:9: Call
    202.       }
    203.   
    204.       if (ssl_clear_bad_session(s)) {
                   ^
    205.           SSL_SESSION_free(s->session);
    206.           s->session = NULL;

ssl/ssl_sess.c:1086:1: Parameter `s->ctx->sessions->num_items`
      1084.   }
      1085.   
      1086. > int ssl_clear_bad_session(SSL *s)
      1087.   {
      1088.       if ((s->session != NULL) &&

ssl/ssl_sess.c:1091:9: Call
      1089.           !(s->shutdown & SSL_SENT_SHUTDOWN) &&
      1090.           !(SSL_in_init(s) || SSL_in_before(s))) {
      1091.           SSL_CTX_remove_session(s->ctx, s->session);
                      ^
      1092.           return (1);
      1093.       } else

ssl/ssl_sess.c:787:1: Parameter `ctx->sessions->num_items`
        785.   }
        786.   
        787. > int SSL_CTX_remove_session(SSL_CTX *ctx, SSL_SESSION *c)
        788.   {
        789.       return remove_session_lock(ctx, c, 1);

ssl/ssl_sess.c:789:12: Call
        787.   int SSL_CTX_remove_session(SSL_CTX *ctx, SSL_SESSION *c)
        788.   {
        789.       return remove_session_lock(ctx, c, 1);
                          ^
        790.   }
        791.   

ssl/ssl_sess.c:792:1: Parameter `ctx->sessions->num_items`
          790.   }
          791.   
          792. > static int remove_session_lock(SSL_CTX *ctx, SSL_SESSION *c, int lck)
          793.   {
          794.       SSL_SESSION *r;

ssl/ssl_sess.c:802:17: Call
          800.           if ((r = lh_SSL_SESSION_retrieve(ctx->sessions, c)) == c) {
          801.               ret = 1;
          802.               r = lh_SSL_SESSION_delete(ctx->sessions, c);
                                 ^
          803.               SSL_SESSION_list_remove(ctx, c);
          804.           }

crypto/lhash/lhash.c:209:1: <LHS trace>
207.   }
208.   
209. > void *lh_delete(_LHASH *lh, const void *data)
210.   {
211.       unsigned long hash;

crypto/lhash/lhash.c:209:1: Parameter `lh->num_items`
            207.   }
            208.   
            209. > void *lh_delete(_LHASH *lh, const void *data)
            210.   {
            211.       unsigned long hash;

crypto/lhash/lhash.c:229:5: Binary operation: (0 - 1):unsigned64 by call to `SSL_new` 
            227.       }
            228.   
            229.       lh->num_items--;
                       ^
            230.       if ((lh->num_nodes > MIN_NODES) &&
            231.           (lh->down_load >= (lh->num_items * LH_LOAD_MULT / lh->num_nodes)))

void *lh_delete(_LHASH *lh, const void *data)
{
    unsigned long hash;
    LHASH_NODE *nn, **rn;
    void *ret;
    lh->error = 0;
    rn = getrn(lh, data, &hash);
    if (*rn == NULL) {
        lh->num_no_delete++;
        return (NULL);
    } else {
        nn = *rn;
        *rn = nn->next;
        ret = nn->data;
        OPENSSL_free(nn);
        lh->num_delete++;
    }
    lh->num_items--;
    if ((lh->num_nodes > MIN_NODES) &&
        (lh->down_load >= (lh->num_items * LH_LOAD_MULT / lh->num_nodes)))
        contract(lh);
    return (ret);
}
['int ciphers_main(int argc, char **argv)\n{\n    SSL_CTX *ctx = NULL;\n    SSL *ssl = NULL;\n    STACK_OF(SSL_CIPHER) *sk = NULL;\n    const SSL_METHOD *meth = TLS_server_method();\n    int ret = 1, i, verbose = 0, Verbose = 0, use_supported = 0;\n#ifndef OPENSSL_NO_SSL_TRACE\n    int stdname = 0;\n#endif\n    const char *p;\n    char *ciphers = NULL, *prog;\n    char buf[512];\n    OPTION_CHOICE o;\n    prog = opt_init(argc, argv, ciphers_options);\n    while ((o = opt_next()) != OPT_EOF) {\n        switch (o) {\n        case OPT_EOF:\n        case OPT_ERR:\n opthelp:\n            BIO_printf(bio_err, "%s: Use -help for summary.\\n", prog);\n            goto end;\n        case OPT_HELP:\n            opt_help(ciphers_options);\n            ret = 0;\n            goto end;\n        case OPT_V:\n            verbose = 1;\n            break;\n        case OPT_UPPER_V:\n            verbose = Verbose = 1;\n            break;\n        case OPT_S:\n            use_supported = 1;\n            break;\n        case OPT_STDNAME:\n#ifndef OPENSSL_NO_SSL_TRACE\n            stdname = verbose = 1;\n#endif\n            break;\n        case OPT_SSL3:\n#ifndef OPENSSL_NO_SSL3\n            meth = SSLv3_client_method();\n#endif\n            break;\n        case OPT_TLS1:\n            meth = TLSv1_client_method();\n            break;\n        }\n    }\n    argv = opt_rest();\n    argc = opt_num_rest();\n    if (argc == 1)\n        ciphers = *argv;\n    else if (argc != 0)\n        goto opthelp;\n    if (!app_load_modules(NULL))\n        goto end;\n    ctx = SSL_CTX_new(meth);\n    if (ctx == NULL)\n        goto err;\n    if (ciphers != NULL) {\n        if (!SSL_CTX_set_cipher_list(ctx, ciphers)) {\n            BIO_printf(bio_err, "Error in cipher list\\n");\n            goto err;\n        }\n    }\n    ssl = SSL_new(ctx);\n    if (ssl == NULL)\n        goto err;\n    if (use_supported)\n        sk = SSL_get1_supported_ciphers(ssl);\n    else\n        sk = SSL_get_ciphers(ssl);\n    if (!verbose) {\n        for (i = 0; i < sk_SSL_CIPHER_num(sk); i++) {\n            SSL_CIPHER *c = sk_SSL_CIPHER_value(sk, i);\n            p = SSL_CIPHER_get_name(c);\n            if (p == NULL)\n                break;\n            if (i != 0)\n                BIO_printf(bio_out, ":");\n            BIO_printf(bio_out, "%s", p);\n        }\n        BIO_printf(bio_out, "\\n");\n    } else {\n        for (i = 0; i < sk_SSL_CIPHER_num(sk); i++) {\n            SSL_CIPHER *c;\n            c = sk_SSL_CIPHER_value(sk, i);\n            if (Verbose) {\n                unsigned long id = SSL_CIPHER_get_id(c);\n                int id0 = (int)(id >> 24);\n                int id1 = (int)((id >> 16) & 0xffL);\n                int id2 = (int)((id >> 8) & 0xffL);\n                int id3 = (int)(id & 0xffL);\n                if ((id & 0xff000000L) == 0x03000000L)\n                    BIO_printf(bio_out, "          0x%02X,0x%02X - ", id2, id3);\n                else\n                    BIO_printf(bio_out, "0x%02X,0x%02X,0x%02X,0x%02X - ", id0, id1, id2, id3);\n            }\n#ifndef OPENSSL_NO_SSL_TRACE\n            if (stdname) {\n                const char *nm = SSL_CIPHER_standard_name(c);\n                if (nm == NULL)\n                    nm = "UNKNOWN";\n                BIO_printf(bio_out, "%s - ", nm);\n            }\n#endif\n            BIO_puts(bio_out, SSL_CIPHER_description(c, buf, sizeof buf));\n        }\n    }\n    ret = 0;\n    goto end;\n err:\n    ERR_print_errors(bio_err);\n end:\n    if (use_supported)\n        sk_SSL_CIPHER_free(sk);\n    SSL_CTX_free(ctx);\n    SSL_free(ssl);\n    return (ret);\n}', 'SSL_CTX *SSL_CTX_new(const SSL_METHOD *meth)\n{\n    SSL_CTX *ret = NULL;\n    if (meth == NULL) {\n        SSLerr(SSL_F_SSL_CTX_NEW, SSL_R_NULL_SSL_METHOD_PASSED);\n        return (NULL);\n    }\n    if (FIPS_mode() && (meth->version < TLS1_VERSION)) {\n        SSLerr(SSL_F_SSL_CTX_NEW, SSL_R_ONLY_TLS_ALLOWED_IN_FIPS_MODE);\n        return NULL;\n    }\n    if (SSL_get_ex_data_X509_STORE_CTX_idx() < 0) {\n        SSLerr(SSL_F_SSL_CTX_NEW, SSL_R_X509_VERIFICATION_SETUP_PROBLEMS);\n        goto err;\n    }\n    ret = OPENSSL_malloc(sizeof(*ret));\n    if (ret == NULL)\n        goto err;\n    memset(ret, 0, sizeof(*ret));\n    ret->method = meth;\n    ret->cert_store = NULL;\n    ret->session_cache_mode = SSL_SESS_CACHE_SERVER;\n    ret->session_cache_size = SSL_SESSION_CACHE_MAX_SIZE_DEFAULT;\n    ret->session_cache_head = NULL;\n    ret->session_cache_tail = NULL;\n    ret->session_timeout = meth->get_timeout();\n    ret->new_session_cb = 0;\n    ret->remove_session_cb = 0;\n    ret->get_session_cb = 0;\n    ret->generate_session_id = 0;\n    memset(&ret->stats, 0, sizeof(ret->stats));\n    ret->references = 1;\n    ret->quiet_shutdown = 0;\n    ret->info_callback = NULL;\n    ret->app_verify_callback = 0;\n    ret->app_verify_arg = NULL;\n    ret->max_cert_list = SSL_MAX_CERT_LIST_DEFAULT;\n    ret->read_ahead = 0;\n    ret->msg_callback = 0;\n    ret->msg_callback_arg = NULL;\n    ret->verify_mode = SSL_VERIFY_NONE;\n    ret->sid_ctx_length = 0;\n    ret->default_verify_callback = NULL;\n    if ((ret->cert = ssl_cert_new()) == NULL)\n        goto err;\n    ret->default_passwd_callback = 0;\n    ret->default_passwd_callback_userdata = NULL;\n    ret->client_cert_cb = 0;\n    ret->app_gen_cookie_cb = 0;\n    ret->app_verify_cookie_cb = 0;\n    ret->sessions = lh_SSL_SESSION_new();\n    if (ret->sessions == NULL)\n        goto err;\n    ret->cert_store = X509_STORE_new();\n    if (ret->cert_store == NULL)\n        goto err;\n    if (!ssl_create_cipher_list(ret->method,\n                           &ret->cipher_list, &ret->cipher_list_by_id,\n                           SSL_DEFAULT_CIPHER_LIST, ret->cert)\n       || sk_SSL_CIPHER_num(ret->cipher_list) <= 0) {\n        SSLerr(SSL_F_SSL_CTX_NEW, SSL_R_LIBRARY_HAS_NO_CIPHERS);\n        goto err2;\n    }\n    ret->param = X509_VERIFY_PARAM_new();\n    if (!ret->param)\n        goto err;\n    if ((ret->md5 = EVP_get_digestbyname("ssl3-md5")) == NULL) {\n        SSLerr(SSL_F_SSL_CTX_NEW, SSL_R_UNABLE_TO_LOAD_SSL3_MD5_ROUTINES);\n        goto err2;\n    }\n    if ((ret->sha1 = EVP_get_digestbyname("ssl3-sha1")) == NULL) {\n        SSLerr(SSL_F_SSL_CTX_NEW, SSL_R_UNABLE_TO_LOAD_SSL3_SHA1_ROUTINES);\n        goto err2;\n    }\n    if ((ret->client_CA = sk_X509_NAME_new_null()) == NULL)\n        goto err;\n    CRYPTO_new_ex_data(CRYPTO_EX_INDEX_SSL_CTX, ret, &ret->ex_data);\n    ret->extra_certs = NULL;\n    if (!(meth->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS))\n        ret->comp_methods = SSL_COMP_get_compression_methods();\n    ret->max_send_fragment = SSL3_RT_MAX_PLAIN_LENGTH;\n    ret->tlsext_servername_callback = 0;\n    ret->tlsext_servername_arg = NULL;\n    if ((RAND_bytes(ret->tlsext_tick_key_name, 16) <= 0)\n        || (RAND_bytes(ret->tlsext_tick_hmac_key, 16) <= 0)\n        || (RAND_bytes(ret->tlsext_tick_aes_key, 16) <= 0))\n        ret->options |= SSL_OP_NO_TICKET;\n    ret->tlsext_status_cb = 0;\n    ret->tlsext_status_arg = NULL;\n#ifndef OPENSSL_NO_NEXTPROTONEG\n    ret->next_protos_advertised_cb = 0;\n    ret->next_proto_select_cb = 0;\n#endif\n#ifndef OPENSSL_NO_PSK\n    ret->psk_identity_hint = NULL;\n    ret->psk_client_callback = NULL;\n    ret->psk_server_callback = NULL;\n#endif\n#ifndef OPENSSL_NO_SRP\n    if (!SSL_CTX_SRP_CTX_init(ret))\n        goto err;\n#endif\n#ifndef OPENSSL_NO_ENGINE\n    ret->client_cert_engine = NULL;\n# ifdef OPENSSL_SSL_CLIENT_ENGINE_AUTO\n#  define eng_strx(x)     #x\n#  define eng_str(x)      eng_strx(x)\n    {\n        ENGINE *eng;\n        eng = ENGINE_by_id(eng_str(OPENSSL_SSL_CLIENT_ENGINE_AUTO));\n        if (!eng) {\n            ERR_clear_error();\n            ENGINE_load_builtin_engines();\n            eng = ENGINE_by_id(eng_str(OPENSSL_SSL_CLIENT_ENGINE_AUTO));\n        }\n        if (!eng || !SSL_CTX_set_client_cert_engine(ret, eng))\n            ERR_clear_error();\n    }\n# endif\n#endif\n    ret->options |= SSL_OP_LEGACY_SERVER_CONNECT;\n    return (ret);\n err:\n    SSLerr(SSL_F_SSL_CTX_NEW, ERR_R_MALLOC_FAILURE);\n err2:\n    SSL_CTX_free(ret);\n    return (NULL);\n}', '_LHASH *lh_new(LHASH_HASH_FN_TYPE h, LHASH_COMP_FN_TYPE c)\n{\n    _LHASH *ret;\n    int i;\n    if ((ret = OPENSSL_malloc(sizeof(*ret))) == NULL)\n        goto err0;\n    if ((ret->b = OPENSSL_malloc(sizeof(*ret->b) * MIN_NODES)) == NULL)\n        goto err1;\n    for (i = 0; i < MIN_NODES; i++)\n        ret->b[i] = NULL;\n    ret->comp = ((c == NULL) ? (LHASH_COMP_FN_TYPE)strcmp : c);\n    ret->hash = ((h == NULL) ? (LHASH_HASH_FN_TYPE)lh_strhash : h);\n    ret->num_nodes = MIN_NODES / 2;\n    ret->num_alloc_nodes = MIN_NODES;\n    ret->p = 0;\n    ret->pmax = MIN_NODES / 2;\n    ret->up_load = UP_LOAD;\n    ret->down_load = DOWN_LOAD;\n    ret->num_items = 0;\n    ret->num_expands = 0;\n    ret->num_expand_reallocs = 0;\n    ret->num_contracts = 0;\n    ret->num_contract_reallocs = 0;\n    ret->num_hash_calls = 0;\n    ret->num_comp_calls = 0;\n    ret->num_insert = 0;\n    ret->num_replace = 0;\n    ret->num_delete = 0;\n    ret->num_no_delete = 0;\n    ret->num_retrieve = 0;\n    ret->num_retrieve_miss = 0;\n    ret->num_hash_comps = 0;\n    ret->error = 0;\n    return (ret);\n err1:\n    OPENSSL_free(ret);\n err0:\n    return (NULL);\n}', 'SSL *SSL_new(SSL_CTX *ctx)\n{\n    SSL *s;\n    if (ctx == NULL) {\n        SSLerr(SSL_F_SSL_NEW, SSL_R_NULL_SSL_CTX);\n        return (NULL);\n    }\n    if (ctx->method == NULL) {\n        SSLerr(SSL_F_SSL_NEW, SSL_R_SSL_CTX_HAS_NO_DEFAULT_SSL_VERSION);\n        return (NULL);\n    }\n    s = OPENSSL_malloc(sizeof(*s));\n    if (s == NULL)\n        goto err;\n    memset(s, 0, sizeof(*s));\n    RECORD_LAYER_init(&s->rlayer, s);\n    s->options = ctx->options;\n    s->mode = ctx->mode;\n    s->max_cert_list = ctx->max_cert_list;\n    s->cert = ssl_cert_dup(ctx->cert);\n    if (s->cert == NULL)\n        goto err;\n    RECORD_LAYER_set_read_ahead(&s->rlayer, ctx->read_ahead);\n    s->msg_callback = ctx->msg_callback;\n    s->msg_callback_arg = ctx->msg_callback_arg;\n    s->verify_mode = ctx->verify_mode;\n    s->not_resumable_session_cb = ctx->not_resumable_session_cb;\n    s->sid_ctx_length = ctx->sid_ctx_length;\n    OPENSSL_assert(s->sid_ctx_length <= sizeof s->sid_ctx);\n    memcpy(&s->sid_ctx, &ctx->sid_ctx, sizeof(s->sid_ctx));\n    s->verify_callback = ctx->default_verify_callback;\n    s->generate_session_id = ctx->generate_session_id;\n    s->param = X509_VERIFY_PARAM_new();\n    if (!s->param)\n        goto err;\n    X509_VERIFY_PARAM_inherit(s->param, ctx->param);\n    s->quiet_shutdown = ctx->quiet_shutdown;\n    s->max_send_fragment = ctx->max_send_fragment;\n    CRYPTO_add(&ctx->references, 1, CRYPTO_LOCK_SSL_CTX);\n    s->ctx = ctx;\n    s->tlsext_debug_cb = 0;\n    s->tlsext_debug_arg = NULL;\n    s->tlsext_ticket_expected = 0;\n    s->tlsext_status_type = -1;\n    s->tlsext_status_expected = 0;\n    s->tlsext_ocsp_ids = NULL;\n    s->tlsext_ocsp_exts = NULL;\n    s->tlsext_ocsp_resp = NULL;\n    s->tlsext_ocsp_resplen = -1;\n    CRYPTO_add(&ctx->references, 1, CRYPTO_LOCK_SSL_CTX);\n    s->initial_ctx = ctx;\n# ifndef OPENSSL_NO_EC\n    if (ctx->tlsext_ecpointformatlist) {\n        s->tlsext_ecpointformatlist =\n            BUF_memdup(ctx->tlsext_ecpointformatlist,\n                       ctx->tlsext_ecpointformatlist_length);\n        if (!s->tlsext_ecpointformatlist)\n            goto err;\n        s->tlsext_ecpointformatlist_length =\n            ctx->tlsext_ecpointformatlist_length;\n    }\n    if (ctx->tlsext_ellipticcurvelist) {\n        s->tlsext_ellipticcurvelist =\n            BUF_memdup(ctx->tlsext_ellipticcurvelist,\n                       ctx->tlsext_ellipticcurvelist_length);\n        if (!s->tlsext_ellipticcurvelist)\n            goto err;\n        s->tlsext_ellipticcurvelist_length =\n            ctx->tlsext_ellipticcurvelist_length;\n    }\n# endif\n# ifndef OPENSSL_NO_NEXTPROTONEG\n    s->next_proto_negotiated = NULL;\n# endif\n    if (s->ctx->alpn_client_proto_list) {\n        s->alpn_client_proto_list =\n            OPENSSL_malloc(s->ctx->alpn_client_proto_list_len);\n        if (s->alpn_client_proto_list == NULL)\n            goto err;\n        memcpy(s->alpn_client_proto_list, s->ctx->alpn_client_proto_list,\n               s->ctx->alpn_client_proto_list_len);\n        s->alpn_client_proto_list_len = s->ctx->alpn_client_proto_list_len;\n    }\n    s->verify_result = X509_V_OK;\n    s->method = ctx->method;\n    if (!s->method->ssl_new(s))\n        goto err;\n    s->references = 1;\n    s->server = (ctx->method->ssl_accept == ssl_undefined_function) ? 0 : 1;\n    if (!SSL_clear(s))\n        goto err;\n    CRYPTO_new_ex_data(CRYPTO_EX_INDEX_SSL, s, &s->ex_data);\n#ifndef OPENSSL_NO_PSK\n    s->psk_client_callback = ctx->psk_client_callback;\n    s->psk_server_callback = ctx->psk_server_callback;\n#endif\n    return (s);\n err:\n    SSL_free(s);\n    SSLerr(SSL_F_SSL_NEW, ERR_R_MALLOC_FAILURE);\n    return (NULL);\n}', 'int SSL_clear(SSL *s)\n{\n    if (s->method == NULL) {\n        SSLerr(SSL_F_SSL_CLEAR, SSL_R_NO_METHOD_SPECIFIED);\n        return (0);\n    }\n    if (ssl_clear_bad_session(s)) {\n        SSL_SESSION_free(s->session);\n        s->session = NULL;\n    }\n    s->error = 0;\n    s->hit = 0;\n    s->shutdown = 0;\n    if (s->renegotiate) {\n        SSLerr(SSL_F_SSL_CLEAR, ERR_R_INTERNAL_ERROR);\n        return 0;\n    }\n    s->type = 0;\n    s->state = SSL_ST_BEFORE | ((s->server) ? SSL_ST_ACCEPT : SSL_ST_CONNECT);\n    s->version = s->method->version;\n    s->client_version = s->version;\n    s->rwstate = SSL_NOTHING;\n    BUF_MEM_free(s->init_buf);\n    s->init_buf = NULL;\n    clear_ciphers(s);\n    s->first_packet = 0;\n    if (!s->in_handshake && (s->session == NULL)\n        && (s->method != s->ctx->method)) {\n        s->method->ssl_free(s);\n        s->method = s->ctx->method;\n        if (!s->method->ssl_new(s))\n            return (0);\n    } else\n        s->method->ssl_clear(s);\n    RECORD_LAYER_clear(&s->rlayer);\n    return (1);\n}', 'int ssl_clear_bad_session(SSL *s)\n{\n    if ((s->session != NULL) &&\n        !(s->shutdown & SSL_SENT_SHUTDOWN) &&\n        !(SSL_in_init(s) || SSL_in_before(s))) {\n        SSL_CTX_remove_session(s->ctx, s->session);\n        return (1);\n    } else\n        return (0);\n}', 'int SSL_CTX_remove_session(SSL_CTX *ctx, SSL_SESSION *c)\n{\n    return remove_session_lock(ctx, c, 1);\n}', 'static int remove_session_lock(SSL_CTX *ctx, SSL_SESSION *c, int lck)\n{\n    SSL_SESSION *r;\n    int ret = 0;\n    if ((c != NULL) && (c->session_id_length != 0)) {\n        if (lck)\n            CRYPTO_w_lock(CRYPTO_LOCK_SSL_CTX);\n        if ((r = lh_SSL_SESSION_retrieve(ctx->sessions, c)) == c) {\n            ret = 1;\n            r = lh_SSL_SESSION_delete(ctx->sessions, c);\n            SSL_SESSION_list_remove(ctx, c);\n        }\n        if (lck)\n            CRYPTO_w_unlock(CRYPTO_LOCK_SSL_CTX);\n        if (ret) {\n            r->not_resumable = 1;\n            if (ctx->remove_session_cb != NULL)\n                ctx->remove_session_cb(ctx, r);\n            SSL_SESSION_free(r);\n        }\n    } else\n        ret = 0;\n    return (ret);\n}', 'void *lh_delete(_LHASH *lh, const void *data)\n{\n    unsigned long hash;\n    LHASH_NODE *nn, **rn;\n    void *ret;\n    lh->error = 0;\n    rn = getrn(lh, data, &hash);\n    if (*rn == NULL) {\n        lh->num_no_delete++;\n        return (NULL);\n    } else {\n        nn = *rn;\n        *rn = nn->next;\n        ret = nn->data;\n        OPENSSL_free(nn);\n        lh->num_delete++;\n    }\n    lh->num_items--;\n    if ((lh->num_nodes > MIN_NODES) &&\n        (lh->down_load >= (lh->num_items * LH_LOAD_MULT / lh->num_nodes)))\n        contract(lh);\n    return (ret);\n}']