Fix memory leak.
PR#2531 (Imported from upstream's 15de0f609c859883347357aaf6cc685c797358bd) Change-Id: I4ee3a5ce22ee047a8eaa2c74f26971109a23680c
This commit is contained in:
parent
46cfb0e4ee
commit
3e14885558
@ -2906,7 +2906,11 @@ static int tls_decrypt_ticket(SSL *s, const unsigned char *etick, int eticklen,
|
||||
}
|
||||
EVP_DecryptUpdate(&ctx, sdec, &slen, p, eticklen);
|
||||
if (EVP_DecryptFinal_ex(&ctx, sdec + slen, &mlen) <= 0)
|
||||
{
|
||||
EVP_CIPHER_CTX_cleanup(&ctx);
|
||||
OPENSSL_free(sdec);
|
||||
return 2;
|
||||
}
|
||||
slen += mlen;
|
||||
EVP_CIPHER_CTX_cleanup(&ctx);
|
||||
p = sdec;
|
||||
|
Loading…
Reference in New Issue
Block a user