Unverified Commit 0e7c8bdc authored by Anna Henningsen's avatar Anna Henningsen Committed by James M Snell
Browse files

quic: return 0 from SSL_CTX_sess_set_new_cb callback

The callback passed to `SSL_CTX_sess_set_new_cb()` should return 1
if it takes ownership (i.e. holds a reference that is later freed
through `SSL_SESSION_free()`) of the passed session, and 0
otherwise.

Since we don’t take ownership of the session and instead only save
a serialized version of it, return 0 instead of 1. This closes
a memory leak reported when running
`sequential/test-quic-preferred-address-ipv6`.

PR-URL: https://github.com/nodejs/node/pull/33931


Reviewed-By: default avatarJames M Snell <jasnell@gmail.com>
Reviewed-By: default avatarDaniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: default avatarTobias Nießen <tniessen@tnie.de>
parent a0417237
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment