Merge "Call EVP_CIPHER_CTX_cleanup to avoid leaking memory that was allocated in EVP_DecryptInit_ex"
diff --git a/cryptfs.c b/cryptfs.c
index 0334bbd..6dd56cb 100644
--- a/cryptfs.c
+++ b/cryptfs.c
@@ -1409,6 +1409,8 @@
       SLOGE("encrypt_master_key: crypto_scrypt failed");
     }
 
+    EVP_CIPHER_CTX_cleanup(&e_ctx);
+
     return 0;
 }
 
@@ -1458,6 +1460,8 @@
     }
   }
 
+  EVP_CIPHER_CTX_cleanup(&d_ctx);
+
   return 0;
 }