VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Common/Dlgcode.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/Common/Dlgcode.c')
-rw-r--r--src/Common/Dlgcode.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/Common/Dlgcode.c b/src/Common/Dlgcode.c
index a0c425c5..42e52468 100644
--- a/src/Common/Dlgcode.c
+++ b/src/Common/Dlgcode.c
@@ -7425,7 +7425,10 @@ char *LoadFile (const char *fileName, DWORD *size)
return NULL;
if ((fileSize = GetFileSize (h, NULL)) == INVALID_FILE_SIZE)
+ {
+ CloseHandle (h);
return NULL;
+ }
*size = fileSize;
buf = (char *) calloc (*size + 1, 1);