]> git.ipfire.org Git - thirdparty/openssl.git/commit
Fix memory leak in tls_parse_ctos_psk()
authorNiels Dossche <7771979+nielsdos@users.noreply.github.com>
Wed, 9 Oct 2024 13:42:37 +0000 (15:42 +0200)
committerTomas Mraz <tomas@openssl.org>
Fri, 11 Oct 2024 12:54:03 +0000 (14:54 +0200)
commitb2474b287fbc7a24f0aa15e6808c6e3ef8287f23
tree446078b3ec79b3ed098883fc23dc28aaf8630349
parent01244adfc66aadc1fc3c6cfb8c96a0a6da3d4a3e
Fix memory leak in tls_parse_ctos_psk()

`sess` is not NULL at this point, and is freed on the success path, but
not on the error path. Fix this by going to the `err` label such that
`SSL_SESSION_free(sess)` is called.

CLA: trivial

Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/25643)
ssl/statem/extensions_srvr.c