OpenSSL: Use a correct EVP_CIPHER_CTX freeing function on an error path
aes_encrypt_init() used incorrect function to free the EVP_CIPHER_CTX allocated within this function. Fix that to use the OpenSSL function for freeing the context. Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
658296ea5b
commit
7e4984d9ca
1 changed files with 1 additions and 1 deletions
|
@ -412,7 +412,7 @@ void * aes_encrypt_init(const u8 *key, size_t len)
|
|||
if (ctx == NULL)
|
||||
return NULL;
|
||||
if (EVP_EncryptInit_ex(ctx, type, NULL, key, NULL) != 1) {
|
||||
os_free(ctx);
|
||||
EVP_CIPHER_CTX_free(ctx);
|
||||
return NULL;
|
||||
}
|
||||
EVP_CIPHER_CTX_set_padding(ctx, 0);
|
||||
|
|
Loading…
Add table
Reference in a new issue