[openssl/openssl] c58b6f: Fix memory leak in tls_parse_ctos_psk()

0 views
Skip to first unread message

Niels Dossche

unread,
Oct 11, 2024, 8:56:03 AM10/11/24
to openssl...@openssl.org
Branch: refs/heads/openssl-3.3
Home: https://github.com/openssl/openssl
Commit: c58b6fdc3209a220fc1f59b41c2ad9a7084a8b7b
https://github.com/openssl/openssl/commit/c58b6fdc3209a220fc1f59b41c2ad9a7084a8b7b
Author: Niels Dossche <7771979+...@users.noreply.github.com>
Date: 2024-10-11 (Fri, 11 Oct 2024)

Changed paths:
M ssl/statem/extensions_srvr.c

Log Message:
-----------
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ý <sas...@openssl.org>
Reviewed-by: Tom Cosgrove <tom.co...@arm.com>
Reviewed-by: Tomas Mraz <to...@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/25643)

(cherry picked from commit b2474b287fbc7a24f0aa15e6808c6e3ef8287f23)



To unsubscribe from these emails, change your notification settings at https://github.com/openssl/openssl/settings/notifications
Reply all
Reply to author
Forward
0 new messages