tls: Fix an invalid free on CBC encryption failure
This commit is contained in:
@@ -91,7 +91,6 @@ METHOD(tls_aead_t, encrypt, bool,
|
|||||||
/* encrypt inline */
|
/* encrypt inline */
|
||||||
if (!this->crypter->encrypt(this->crypter, *data, iv, NULL))
|
if (!this->crypter->encrypt(this->crypter, *data, iv, NULL))
|
||||||
{
|
{
|
||||||
free(data->ptr);
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
/* prepend IV */
|
/* prepend IV */
|
||||||
|
|||||||
Reference in New Issue
Block a user