Merge pull request #6386 from akallabeth/connect_double_free

Set BIO data NULL on cleanup
This commit is contained in:
Norbert Federa 2020-07-23 12:16:15 +02:00 committed by GitHub
commit d1a78b1b3b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -461,6 +461,7 @@ static int bio_rdp_tls_free(BIO* bio)
if (!tls)
return 0;
BIO_set_data(bio, NULL);
if (BIO_get_shutdown(bio))
{
if (BIO_get_init(bio) && tls->ssl)
@ -475,6 +476,7 @@ static int bio_rdp_tls_free(BIO* bio)
DeleteCriticalSection(&tls->lock);
free(tls);
return 1;
}