From b5c7316666d072ce448e0aea96d981065e777da6 Mon Sep 17 00:00:00 2001 From: Slava Semushin Date: Sat, 23 May 2009 17:20:26 +0700 Subject: [PATCH 1/2] Fixed ticket #327 (File descriptor leak not detected when feof() used) Thanks to aggro80@ for help. http://apps.sourceforge.net/trac/cppcheck/ticket/327 --- src/checkmemoryleak.cpp | 2 +- test/testmemleak.cpp | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/checkmemoryleak.cpp b/src/checkmemoryleak.cpp index 35a14a35c..2a38fd8cd 100644 --- a/src/checkmemoryleak.cpp +++ b/src/checkmemoryleak.cpp @@ -214,7 +214,7 @@ const char * CheckMemoryLeakClass::call_func(const Token *tok, std::list Date: Sat, 23 May 2009 18:01:18 +0700 Subject: [PATCH 2/2] Added 17 functions which work with FILE structure to white list. Inspired by previous commit. --- src/checkmemoryleak.cpp | 4 +++- test/testmemleak.cpp | 23 ++++++++++++++++++++--- 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/checkmemoryleak.cpp b/src/checkmemoryleak.cpp index 2a38fd8cd..fe65b980b 100644 --- a/src/checkmemoryleak.cpp +++ b/src/checkmemoryleak.cpp @@ -214,7 +214,9 @@ const char * CheckMemoryLeakClass::call_func(const Token *tok, std::list