summaryrefslogtreecommitdiffstats
path: root/ssl
diff options
context:
space:
mode:
authorWatson Ladd <watsonbladd@gmail.com>2023-04-27 10:14:51 -0700
committerTomas Mraz <tomas@openssl.org>2023-05-12 10:24:27 +0200
commit98be1f56352e624fcf245d5138901d5a9e1a9c83 (patch)
treed5d3cbaf7567bdfa570ee58bd4e7a46b40b59274 /ssl
parent90a071e8bbf7c71fcf493b47d61de8c45333edb4 (diff)
Clear ownership when duplicating sessions
Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Todd Short <todd.short@me.com> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/20848) (cherry picked from commit 9fdf9a44bbe3827fe653165a07281ccae8ab0947)
Diffstat (limited to 'ssl')
-rw-r--r--ssl/ssl_sess.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ssl/ssl_sess.c b/ssl/ssl_sess.c
index 68b57a532b..d071508356 100644
--- a/ssl/ssl_sess.c
+++ b/ssl/ssl_sess.c
@@ -190,9 +190,10 @@ SSL_SESSION *ssl_session_dup(const SSL_SESSION *src, int ticket)
dest->ticket_appdata = NULL;
memset(&dest->ex_data, 0, sizeof(dest->ex_data));
- /* We deliberately don't copy the prev and next pointers */
+ /* As the copy is not in the cache, we remove the associated pointers */
dest->prev = NULL;
dest->next = NULL;
+ dest->owner = NULL;
dest->references = 1;