summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Faure <faure@kde.org>2012-08-03 12:30:59 +0200
committerQt by Nokia <qt-info@nokia.com>2012-08-06 23:05:55 +0200
commitade43d4bc4240ead5d641ae84a1ff37f60d19c9c (patch)
tree8bf057dc3cfbf3d074a33be7845dc7119fbb72cf /src
parentf07d3f9184b9d5394c5a44f4788711c781a2ea49 (diff)
Fix valgrind errors due to "const char *getSystemLocale"
qgetenv returns a QByteArray, so casting that to a char* leads to using deleted memory. This was introduced by 25c4ce6deef20c69d00fe1197a60e8b7587c81cb. Change-Id: I27ccad022e327e119fea3c3cdcf9beb541ab9097 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Nick Ratelle <nratelle@qnx.com>
Diffstat (limited to 'src')
-rw-r--r--src/corelib/tools/qlocale_unix.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/tools/qlocale_unix.cpp b/src/corelib/tools/qlocale_unix.cpp
index e702ecf777..4a5689c925 100644
--- a/src/corelib/tools/qlocale_unix.cpp
+++ b/src/corelib/tools/qlocale_unix.cpp
@@ -52,7 +52,7 @@
QT_BEGIN_NAMESPACE
-static const char *getSystemLocale()
+static QByteArray getSystemLocale()
{
#if defined(Q_OS_QNX)
static char buff[257];