2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-09-02 15:45:25 +00:00

Take ownership of pointer before freeing

This commit is contained in:
Mark Andrews
2023-07-20 13:10:29 +10:00
parent 4c4ecbc83c
commit 9e2288208d

View File

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