From ebb4e044a7b6e60331647a51d80140ea9ccf722d Mon Sep 17 00:00:00 2001
From: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Date: Tue, 15 Jun 2010 20:50:21 +0200
Subject: [PATCH] plug raw data leaks

---
 src/shared/proparser/profileevaluator.cpp | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/shared/proparser/profileevaluator.cpp b/src/shared/proparser/profileevaluator.cpp
index b2d4341dcb4..f0969b9abea 100644
--- a/src/shared/proparser/profileevaluator.cpp
+++ b/src/shared/proparser/profileevaluator.cpp
@@ -3012,7 +3012,9 @@ ProStringList ProFileEvaluator::Private::evaluateExpandFunction(
                 logMessage(format("fromfile(file, variable) requires two arguments."));
             } else {
                 QHash<ProString, ProStringList> vars;
-                if (evaluateFileInto(resolvePath(expandEnvVars(args.at(0).toQString(m_tmp1))), &vars, 0))
+                QString fn = resolvePath(expandEnvVars(args.at(0).toQString(m_tmp1)));
+                fn.detach();
+                if (evaluateFileInto(fn, &vars, 0))
                     ret = vars.value(map(args.at(1)));
             }
             break;
@@ -3290,7 +3292,9 @@ ProFileEvaluator::Private::VisitReturn ProFileEvaluator::Private::evaluateCondit
                 logMessage(format("infile(file, var, [values]) requires two or three arguments."));
             } else {
                 QHash<ProString, ProStringList> vars;
-                if (!evaluateFileInto(resolvePath(expandEnvVars(args.at(0).toQString(m_tmp1))), &vars, 0))
+                QString fn = resolvePath(expandEnvVars(args.at(0).toQString(m_tmp1)));
+                fn.detach();
+                if (!evaluateFileInto(fn, &vars, 0))
                     return ReturnFalse;
                 if (args.count() == 2)
                     return returnBool(vars.contains(args.at(1)));
-- 
GitLab