From 2e445b195cfc83a4d84fb364d47f4ab8eb0df8d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Wed, 19 Nov 2008 18:57:35 +0000 Subject: [PATCH] Memory leak: Minor update to make the checking stronger --- CheckMemoryLeak.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CheckMemoryLeak.cpp b/CheckMemoryLeak.cpp index d6aa8a62f..f6bda1d7d 100644 --- a/CheckMemoryLeak.cpp +++ b/CheckMemoryLeak.cpp @@ -588,8 +588,9 @@ void CheckMemoryLeakClass::simplifycode(TOKEN *tok) // Delete empty if that is not followed by an else if ( Match(tok2,"[;{}] if ;") || - Match(tok2,"[;{}] if(var) ;") || - Match(tok2,"[;{}] if(!var) ;") ) + Match(tok2,"[;{}] if(var) ;") || + Match(tok2,"[;{}] if(!var) ;") || + Match(tok2,"[;{}] ifv ;") ) { if ( ! Match(Tokenizer::gettok(tok2,3), "else") ) {