autotools: Plug small memory leak

Change-Id: I04762208ad5cc96585a8ffdd48fe2c49670f00a0
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This commit is contained in:
Mathias Hasselmann
2012-11-07 21:45:02 +02:00
committed by Orgad Shaneh
parent 122585dc5a
commit 29a2413d42

View File

@@ -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());