mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-30 18:57:27 +02:00
wolfcrypt: aes: gcm: streaming api: add missing wc_AesFree()
This commit is contained in:
@ -9415,6 +9415,10 @@ int wc_AesGcmDecryptFinal(Aes* aes, const byte* authTag, word32 authTagSz)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* reset the state */
|
||||||
|
if (ret == 0)
|
||||||
|
wc_AesFree(aes);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
#endif /* HAVE_AES_DECRYPT || HAVE_AESGCM_DECRYPT */
|
#endif /* HAVE_AES_DECRYPT || HAVE_AESGCM_DECRYPT */
|
||||||
@ -10384,6 +10388,7 @@ void wc_AesFree(Aes* aes)
|
|||||||
!defined(WOLFSSL_AESNI)
|
!defined(WOLFSSL_AESNI)
|
||||||
if (aes->streamData != NULL) {
|
if (aes->streamData != NULL) {
|
||||||
XFREE(aes->streamData, aes->heap, DYNAMIC_TYPE_AES);
|
XFREE(aes->streamData, aes->heap, DYNAMIC_TYPE_AES);
|
||||||
|
aes->streamData = NULL;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user