summaryrefslogtreecommitdiff
path: root/src/shared/proparser
diff options
context:
space:
mode:
authordt <qtc-committer@nokia.com>2009-06-04 15:18:14 +0200
committerdt <qtc-committer@nokia.com>2009-06-04 15:18:14 +0200
commit07730341bd739aac823ac9b4336d8294510a35e2 (patch)
tree28dc85feda079656330c9db0d0ecd318020d7c62 /src/shared/proparser
parentc13d71165773ba1e00543aefe9523c369095a266 (diff)
downloadqt-creator-07730341bd739aac823ac9b4336d8294510a35e2.tar.gz
Fix memory leak in $$system() calls from .pro files
Reviewed-By: ossi
Diffstat (limited to 'src/shared/proparser')
-rw-r--r--src/shared/proparser/profileevaluator.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/shared/proparser/profileevaluator.cpp b/src/shared/proparser/profileevaluator.cpp
index 47c9b93b33..4c40d416ae 100644
--- a/src/shared/proparser/profileevaluator.cpp
+++ b/src/shared/proparser/profileevaluator.cpp
@@ -56,8 +56,10 @@
#ifdef Q_OS_WIN32
#define QT_POPEN _popen
+#define QT_PCLOSE _pclose
#else
#define QT_POPEN popen
+#define QT_PCLOSE pclose
#endif
QT_BEGIN_NAMESPACE
@@ -1626,6 +1628,8 @@ QStringList ProFileEvaluator::Private::evaluateExpandFunction(const QString &fun
output += QLatin1String(buff);
}
ret += split_value_list(output);
+ if (proc)
+ QT_PCLOSE(proc);
}
}
break;