C++: Fix memory leak in preprocessor.

This addresses the main memory leak revealed in QTCREATORBUG-7645.
The other leaks seem to have their origin in Qt.

Task-Number: QTCREATORBUG-7645.
Change-Id: I77f45449416c143b222ed5f5c905cba9674f95bb
Reviewed-by: Christian Kamm <kamm@incasoftware.de>
This commit is contained in:
Nikolai Kosjar
2012-09-17 14:46:19 +02:00
committed by Christian Kamm
parent adb40fadb6
commit 2f88a46e4e

View File

@@ -1297,6 +1297,8 @@ void Preprocessor::preprocess(const QString &fileName, const QByteArray &source,
removeTrailingOutputLines();
delete m_state.m_lexer;
while (m_state.m_tokenBuffer)
m_state.popTokenBuffer();
m_state = savedState;
m_env->currentFile = previousFileName;