VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Common/Dlgcode.c
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2020-03-02 17:44:12 +0100
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2020-03-10 10:32:38 +0100
commit65500305404a6100b50161343637c115e5718c9e (patch)
tree84fecace8aeaf017adeae78b2b3bc67e1bad5e95 /src/Common/Dlgcode.c
parent68b9c9c72da2bb544098786c568902b902675bef (diff)
downloadVeraCrypt-65500305404a6100b50161343637c115e5718c9e.tar.gz
VeraCrypt-65500305404a6100b50161343637c115e5718c9e.zip
Windows: Fix keyfiles path passed as CLI argument and set as default not always cleared from RAM when VeraCrypt exits
Diffstat (limited to 'src/Common/Dlgcode.c')
-rw-r--r--src/Common/Dlgcode.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Common/Dlgcode.c b/src/Common/Dlgcode.c
index 5a2ed526..244a82b1 100644
--- a/src/Common/Dlgcode.c
+++ b/src/Common/Dlgcode.c
@@ -179,7 +179,7 @@ BOOL bInPlaceEncNonSysPending = FALSE; // TRUE if the non-system in-place encry
BOOL PimEnable = FALSE;
BOOL KeyFilesEnable = FALSE;
KeyFile *FirstKeyFile = NULL;
-KeyFilesDlgParam defaultKeyFilesParam;
+KeyFilesDlgParam defaultKeyFilesParam = {0};
BOOL IgnoreWmDeviceChange = FALSE;
BOOL DeviceChangeBroadcastDisabled = FALSE;
@@ -487,6 +487,8 @@ void FinalizeGlobalLocks ()
void cleanup ()
{
burn (&CmdTokenPin, sizeof (CmdTokenPin));
+ KeyFileRemoveAll (&FirstKeyFile);
+ KeyFileRemoveAll (&defaultKeyFilesParam.FirstKeyFile);
/* Cleanup the GDI fonts */
if (hFixedFont != NULL)