DO NOT MERGE Delete password as per block encryption
(cherry-picked from commit 00f4aade5c172534c16070540d1c6c26d0a78c84)
Bug: 18151196
Change-Id: Iee0f932c61ff4a309dc2861725b24bf976adb4c7
diff --git a/cryptfs.c b/cryptfs.c
index 2306e4a..154feee 100644
--- a/cryptfs.c
+++ b/cryptfs.c
@@ -3718,6 +3718,10 @@
void cryptfs_clear_password()
{
+ if (e4crypt_crypto_complete(DATA_MNT_POINT) == 0) {
+ e4crypt_clear_password(DATA_MNT_POINT);
+ }
+
if (password) {
size_t len = strlen(password);
memset(password, 0, len);