summaryrefslogtreecommitdiffstats
path: root/src/testlib
diff options
context:
space:
mode:
Diffstat (limited to 'src/testlib')
-rw-r--r--src/testlib/qtest.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/testlib/qtest.h b/src/testlib/qtest.h
index 27fe08e8f4..3b1ffb389e 100644
--- a/src/testlib/qtest.h
+++ b/src/testlib/qtest.h
@@ -95,7 +95,7 @@ template<> inline char *toString(const QByteArray &ba)
template<> inline char *toString(const QBitArray &ba)
{
qsizetype size = ba.size();
- char *str = static_cast<char *>(malloc(size + 1));
+ char *str = new char[size + 1];
for (qsizetype i = 0; i < size; ++i)
str[i] = "01"[ba.testBit(i)];
str[size] = '\0';