tls: Fix a memory leak if AEAD encryption fails
This commit is contained in:
1 parent
c0bf721357
commit
867d04b72e
1 file changed
+1
@@ -82,6 +82,7 @@ METHOD(tls_aead_t, encrypt, bool,
|
||||
assoc = chunk_from_thing(hdr);
|
||||
if (!this->aead->encrypt(this->aead, plain, assoc, iv, NULL))
|
||||
{
|
||||
chunk_free(&encrypted);
|
||||
return FALSE;
|
||||
}
|
||||
chunk_free(data);
|
||||
|
||||
Reference in new issue
Block a user