mirror of
				https://github.com/cuberite/polarssl.git
				synced 2025-11-04 04:32:24 -05:00 
			
		
		
		
	Assign NULL after freeing psk and psk_identity
This commit is contained in:
		
							parent
							
								
									316b162ac3
								
							
						
					
					
						commit
						27e8a120b2
					
				@ -7742,6 +7742,7 @@ void mbedtls_ssl_config_free( mbedtls_ssl_config *conf )
 | 
			
		||||
    {
 | 
			
		||||
        mbedtls_zeroize( conf->psk, conf->psk_len );
 | 
			
		||||
        mbedtls_free( conf->psk );
 | 
			
		||||
        conf->psk = NULL;
 | 
			
		||||
        conf->psk_len = 0;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
@ -7749,6 +7750,7 @@ void mbedtls_ssl_config_free( mbedtls_ssl_config *conf )
 | 
			
		||||
    {
 | 
			
		||||
        mbedtls_zeroize( conf->psk_identity, conf->psk_identity_len );
 | 
			
		||||
        mbedtls_free( conf->psk_identity );
 | 
			
		||||
        conf->psk_identity = NULL;
 | 
			
		||||
        conf->psk_identity_len = 0;
 | 
			
		||||
    }
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user