summaryrefslogtreecommitdiffstats
path: root/tools/linguist
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>2009-06-04 13:18:14 (GMT)
committerOswald Buddenhagen <oswald.buddenhagen@nokia.com>2009-07-10 19:13:33 (GMT)
commit3f9a894acb30ff3fb5907f82327af088f96a088d (patch)
tree7def6675cb64cc8b2cae9edb7247064b94293946 /tools/linguist
parentb7cfdc075ce53a5aaf243161c849ee1ee079885c (diff)
downloadQt-3f9a894acb30ff3fb5907f82327af088f96a088d.zip
Qt-3f9a894acb30ff3fb5907f82327af088f96a088d.tar.gz
Qt-3f9a894acb30ff3fb5907f82327af088f96a088d.tar.bz2
Fix memory leak in $$system() calls from .pro files
cherry-picked 07730341bd739aac823ac9b4336d8294510a35e2 from creator
Diffstat (limited to 'tools/linguist')
-rw-r--r--tools/linguist/shared/profileevaluator.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/linguist/shared/profileevaluator.cpp b/tools/linguist/shared/profileevaluator.cpp
index c56f1d4..4ea9c10 100644
--- a/tools/linguist/shared/profileevaluator.cpp
+++ b/tools/linguist/shared/profileevaluator.cpp
@@ -58,8 +58,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
@@ -1204,6 +1206,8 @@ QStringList ProFileEvaluator::Private::evaluateExpandFunction(const QString &fun
output += QLatin1String(buff);
}
ret += split_value_list(output);
+ if (proc)
+ QT_PCLOSE(proc);
}
}
break; }