mirror of https://github.com/openssl/openssl.git
				
				
				
			Memory leak fix ktls_meth.c
The OSSL_RECORD_LAYER needs to be properly freed when return code isnt success.
Memory leak fix
CLA: trivial
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Yang <kaishen.yy@antfin.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27111)
(cherry picked from commit e5e4cf41c7)
			
			
This commit is contained in:
		
							parent
							
								
									d5d5ab9359
								
							
						
					
					
						commit
						00af1ac1fa
					
				| 
						 | 
				
			
			@ -432,7 +432,7 @@ ktls_new_record_layer(OSSL_LIB_CTX *libctx, const char *propq, int vers,
 | 
			
		|||
                                            taglen, mactype, md, comp);
 | 
			
		||||
 | 
			
		||||
    if (ret != OSSL_RECORD_RETURN_SUCCESS) {
 | 
			
		||||
        OPENSSL_free(*retrl);
 | 
			
		||||
        tls_free(*retrl);
 | 
			
		||||
        *retrl = NULL;
 | 
			
		||||
    } else {
 | 
			
		||||
        /*
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue