Assign NULL after freeing psk and psk_identity
diff --git a/library/ssl_tls.c b/library/ssl_tls.c
index 036876c..3802e23 100644
--- a/library/ssl_tls.c
+++ b/library/ssl_tls.c
@@ -7742,6 +7742,7 @@
{
mbedtls_zeroize( conf->psk, conf->psk_len );
mbedtls_free( conf->psk );
+ conf->psk = NULL;
conf->psk_len = 0;
}
@@ -7749,6 +7750,7 @@
{
mbedtls_zeroize( conf->psk_identity, conf->psk_identity_len );
mbedtls_free( conf->psk_identity );
+ conf->psk_identity = NULL;
conf->psk_identity_len = 0;
}
#endif