diff options
author | Lutz Jänicke <jaenicke@openssl.org> | 2002-02-10 12:46:41 +0000 |
---|---|---|
committer | Lutz Jänicke <jaenicke@openssl.org> | 2002-02-10 12:46:41 +0000 |
commit | acfe628b6e093e64d1fba5fea1d5f9b3a7d119cc (patch) | |
tree | 74d039aa5957d710f36f9755c27807c2e35031b5 /ssl | |
parent | 182d8435f03521e6afccd6bdfbfc698502f240b4 (diff) |
Make removal from session cache more robust.
Diffstat (limited to 'ssl')
-rw-r--r-- | ssl/ssl_sess.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ssl/ssl_sess.c b/ssl/ssl_sess.c index 9078d759f5..6424f775e2 100644 --- a/ssl/ssl_sess.c +++ b/ssl/ssl_sess.c @@ -474,10 +474,10 @@ static int remove_session_lock(SSL_CTX *ctx, SSL_SESSION *c, int lck) if ((c != NULL) && (c->session_id_length != 0)) { if(lck) CRYPTO_w_lock(CRYPTO_LOCK_SSL_CTX); - r=(SSL_SESSION *)lh_delete(ctx->sessions,c); - if (r != NULL) + if ((r = (SSL_SESSION *)lh_retrieve(ctx->sessions,c)) == c) { ret=1; + r=(SSL_SESSION *)lh_delete(ctx->sessions,c); SSL_SESSION_list_remove(ctx,c); } |