mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-12 07:37:31 -04:00
qcacld-3.0: Set tfm to NULL to avoid freeing in crypto_free_cipher
qcacld-2.0 to qcacld-3.0 propagation tfm is invalid when alloc fails. Set tfm to NULL to avoid freeing the crypto transform in crypto_free_cipher()->crypto_destroy_tfm. Change-Id: I3261377f3a7b6ab5740d4144be9e84a1a3a07e42 CRs-Fixed: 809085
This commit is contained in:
parent
647ef12880
commit
ecf4211368
1 changed files with 2 additions and 0 deletions
|
|
@ -387,6 +387,7 @@ cds_attach_mmie(uint8_t *igtk, uint8_t *ipn, uint16_t key_id,
|
|||
tfm = cds_crypto_alloc_cipher("aes", 0, CRYPTO_ALG_ASYNC);
|
||||
if (IS_ERR(tfm)) {
|
||||
ret = PTR_ERR(tfm);
|
||||
tfm = NULL;
|
||||
CDF_TRACE(CDF_MODULE_ID_CDF, CDF_TRACE_LEVEL_ERROR,
|
||||
"%s: crypto_alloc_cipher failed (%d)", __func__, ret);
|
||||
goto err_tfm;
|
||||
|
|
@ -497,6 +498,7 @@ cds_is_mmie_valid(uint8_t *igtk, uint8_t *ipn, uint8_t *frm, uint8_t *efrm)
|
|||
tfm = cds_crypto_alloc_cipher("aes", 0, CRYPTO_ALG_ASYNC);
|
||||
if (IS_ERR(tfm)) {
|
||||
ret = PTR_ERR(tfm);
|
||||
tfm = NULL;
|
||||
CDF_TRACE(CDF_MODULE_ID_CDF, CDF_TRACE_LEVEL_ERROR,
|
||||
"crypto_alloc_cipher failed (%d)", ret);
|
||||
goto err_tfm;
|
||||
|
|
|
|||
Loading…
Reference in a new issue