1
0
mirror of https://github.com/veracrypt/VeraCrypt.git synced 2025-11-11 19:08:26 -06:00

Static Code Analysis : fix various memory leaks.

This commit is contained in:
Mounir IDRASSI
2014-07-09 05:35:56 +02:00
parent 5281e2d3b9
commit 899a22b840
4 changed files with 16 additions and 4 deletions

View File

@@ -6743,7 +6743,11 @@ __int64 FindStringInFile (const char *filePath, const char* str, int strLen)
|| buffer == NULL
|| strLen > bufSize
|| strLen < 1)
{
if (buffer)
free (buffer);
return -1;
}
src = CreateFile (filePath, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, NULL);