From 899a22b840316d54a9563726e78f7a201a6702ef Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Wed, 9 Jul 2014 05:35:56 +0200 Subject: Static Code Analysis : fix various memory leaks. --- src/Common/Dlgcode.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/Common/Dlgcode.c') diff --git a/src/Common/Dlgcode.c b/src/Common/Dlgcode.c index f645fdec..084e93d5 100644 --- a/src/Common/Dlgcode.c +++ b/src/Common/Dlgcode.c @@ -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); -- cgit v1.2.3