From 29a2413d426cdb1003e3ce38b29ca48ed4308d53 Mon Sep 17 00:00:00 2001 From: Mathias Hasselmann Date: Wed, 7 Nov 2012 21:45:02 +0200 Subject: [PATCH] autotools: Plug small memory leak Change-Id: I04762208ad5cc96585a8ffdd48fe2c49670f00a0 Reviewed-by: Eike Ziller --- src/plugins/autotoolsprojectmanager/makefileparser.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/plugins/autotoolsprojectmanager/makefileparser.cpp b/src/plugins/autotoolsprojectmanager/makefileparser.cpp index 570db855dd9..6ddeec0ed4e 100644 --- a/src/plugins/autotoolsprojectmanager/makefileparser.cpp +++ b/src/plugins/autotoolsprojectmanager/makefileparser.cpp @@ -72,8 +72,11 @@ bool MakefileParser::parse() m_makefiles.clear(); QFile *file = new QFile(m_makefile); - if (!file->open(QIODevice::ReadOnly | QIODevice::Text)) + if (!file->open(QIODevice::ReadOnly | QIODevice::Text)) { + qWarning("%s: %s", qPrintable(m_makefile), qPrintable(file->errorString())); + delete file; return false; + } QFileInfo info(m_makefile); m_makefiles.append(info.fileName());