Skip to content

Commit

Permalink
Fix swapped SSL_free() and SSL_CTX_free() (#1401)
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkski authored Feb 15, 2022
1 parent 3988137 commit 27224e1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/source/Crypto/Dtls_openssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -414,10 +414,10 @@ STATUS freeDtlsSession(PDtlsSession* ppDtlsSession)
}

if (pDtlsSession->pSsl != NULL) {
SSL_CTX_free(pDtlsSession->pSslCtx);
SSL_free(pDtlsSession->pSsl);
}
if (pDtlsSession->pSslCtx != NULL) {
SSL_free(pDtlsSession->pSsl);
SSL_CTX_free(pDtlsSession->pSslCtx);
}
if (IS_VALID_MUTEX_VALUE(pDtlsSession->sslLock)) {
MUTEX_FREE(pDtlsSession->sslLock);
Expand Down

0 comments on commit 27224e1

Please sign in to comment.