Take ownership of pointer before freeing

(cherry picked from commit 9e2288208d)
This commit is contained in:
Mark Andrews
2023-07-20 13:10:29 +10:00
parent 4c27f80476
commit f77ffa7953

View File

@@ -762,10 +762,12 @@ isc_tls_create(isc_tlsctx_t *ctx) {
void
isc_tls_free(isc_tls_t **tlsp) {
isc_tls_t *tls = NULL;
REQUIRE(tlsp != NULL && *tlsp != NULL);
SSL_free(*tlsp);
tls = *tlsp;
*tlsp = NULL;
SSL_free(tls);
}
const char *