mirror of https://github.com/openssl/openssl.git
				
				
				
			Fix a memory leak in tls_parse_stoc_key_share
Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/16957)
This commit is contained in:
		
							parent
							
								
									afbea17ded
								
							
						
					
					
						commit
						bdaf55d085
					
				| 
						 | 
				
			
			@ -1872,6 +1872,7 @@ int tls_parse_stoc_key_share(SSL *s, PACKET *pkt, unsigned int context, X509 *x,
 | 
			
		|||
    if (skey == NULL || EVP_PKEY_copy_parameters(skey, ckey) <= 0) {
 | 
			
		||||
        SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_F_TLS_PARSE_STOC_KEY_SHARE,
 | 
			
		||||
                 ERR_R_MALLOC_FAILURE);
 | 
			
		||||
        EVP_PKEY_free(skey);
 | 
			
		||||
        return 0;
 | 
			
		||||
    }
 | 
			
		||||
    if (!EVP_PKEY_set1_tls_encodedpoint(skey, PACKET_data(&encoded_pt),
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue