VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Common
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2016-02-11 22:57:40 +0100
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2016-02-12 00:04:28 +0100
commit89d238bb3241fe8c285e9b748c0d99fa10b6a590 (patch)
treeedbfc1229e282644c7469e4cdfbbff3ead0bf4e9 /src/Common
parent7fee9a04c412840b6363b7d311d0bdf435feb5a3 (diff)
downloadVeraCrypt-89d238bb3241fe8c285e9b748c0d99fa10b6a590.tar.gz
VeraCrypt-89d238bb3241fe8c285e9b748c0d99fa10b6a590.zip
Window: fix regression that caused only a single keyfile to be taken into account.
Diffstat (limited to 'src/Common')
-rw-r--r--src/Common/Keyfiles.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Common/Keyfiles.c b/src/Common/Keyfiles.c
index c634efaf..366d65ee 100644
--- a/src/Common/Keyfiles.c
+++ b/src/Common/Keyfiles.c
@@ -129,7 +129,9 @@ void KeyFileCloneAll (KeyFile *firstKeyFile, KeyFile **outputKeyFile)
KeyFile *cloneFirstKeyFile = KeyFileClone (firstKeyFile);
KeyFile *kf;
- KeyFileRemoveAll (outputKeyFile);
+ // free output only if different from input
+ if (*outputKeyFile != firstKeyFile)
+ KeyFileRemoveAll (outputKeyFile);
if (firstKeyFile)
{
kf = firstKeyFile->Next;