Static Code Analysis : fix various memory leaks.

This commit is contained in:
Mounir IDRASSI
2014-11-08 23:20:43 +01:00
parent 5281e2d3b9
commit 899a22b840
4 changed files with 16 additions and 4 deletions
+4
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);