]> git.ipfire.org Git - thirdparty/chrony.git/commit
tls: don't call gnutls_deinit() after failed gnutls_init()
authorMiroslav Lichvar <mlichvar@redhat.com>
Wed, 6 Aug 2025 13:07:18 +0000 (15:07 +0200)
committerMiroslav Lichvar <mlichvar@redhat.com>
Thu, 7 Aug 2025 08:18:31 +0000 (10:18 +0200)
commitabc267a556cbae3172d6014e59c219a10145bda3
treefc184206c95bee8337123994dbaff9db5244d68d
parent9b183fe98f99957a870ed17c1602c161c636e6d8
tls: don't call gnutls_deinit() after failed gnutls_init()

Don't assume gnutls_init() leaves the session pointer at NULL when it
returns with an error status. It might be a session that was already
allocated and then freed without resetting it to NULL after an error.

Fixes: 3e32e7e69412 ("tls: move gnutls code into tls_gnutls.c")
tls_gnutls.c