diff options
author | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2020-07-14 00:34:11 +0200 |
---|---|---|
committer | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2020-07-14 00:40:47 +0200 |
commit | 05f0004cf8a8a6e21383ec65b35f5bbc62906e4c (patch) | |
tree | d0ee787cce95572f71b3b754ba1d8c010aa9be76 | |
parent | 1921b89c48680ec0a180adeaab26a23c3e5a3f72 (diff) | |
download | VeraCrypt-DCS-05f0004cf8a8a6e21383ec65b35f5bbc62906e4c.tar.gz VeraCrypt-DCS-05f0004cf8a8a6e21383ec65b35f5bbc62906e4c.zip |
Fix memory leak in some cases caused by wrong check of pointer for calling MEM_FREE (fix Github issue #20)
-rw-r--r-- | Library/VeraCryptLib/DcsVeraCrypt.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Library/VeraCryptLib/DcsVeraCrypt.c b/Library/VeraCryptLib/DcsVeraCrypt.c index b99ed0b..d3eecef 100644 --- a/Library/VeraCryptLib/DcsVeraCrypt.c +++ b/Library/VeraCryptLib/DcsVeraCrypt.c @@ -89,7 +89,7 @@ CHAR8* gOnExitCancelled = NULL; /////////////////////////////////////////////////////////////////////////
#define VCCONFIG_ALLOC(data, size) \
- if(data == NULL) MEM_FREE(data); \
+ if(data != NULL) MEM_FREE(data); \
data = MEM_ALLOC(size);
VOID
|