Fix memory leak.
PR#2531. (cherry picked from commit 59899c4d1b4b6ee4066a540bad2b62cb22ac3d91)
This commit is contained in:
parent
715258486c
commit
9e6857a358
@ -1114,7 +1114,11 @@ static int tls_decrypt_ticket(SSL *s, const unsigned char *etick, int eticklen,
|
||||
}
|
||||
EVP_DecryptUpdate(&ctx, sdec, &slen, p, eticklen);
|
||||
if (EVP_DecryptFinal(&ctx, sdec + slen, &mlen) <= 0)
|
||||
{
|
||||
EVP_CIPHER_CTX_cleanup(&ctx);
|
||||
OPENSSL_free(sdec);
|
||||
goto tickerr;
|
||||
}
|
||||
slen += mlen;
|
||||
EVP_CIPHER_CTX_cleanup(&ctx);
|
||||
p = sdec;
|
||||
|
Loading…
x
Reference in New Issue
Block a user