diff --git a/packages/common_crypto/lib/src/aes.dart b/packages/common_crypto/lib/src/aes.dart index ef01dc25..10ed60de 100644 --- a/packages/common_crypto/lib/src/aes.dart +++ b/packages/common_crypto/lib/src/aes.dart @@ -76,8 +76,10 @@ class AesCryptor { cryptorRef, ); malloc.free(keyPointer); + malloc.free(ivPointer); if (status != kCCSuccess) { + malloc.free(cryptorRef); throw Exception('CCCryptorCreate failed: $status'); } _cryptorRef = cryptorRef.value;