Close memory leak in QTestLib support for string to numeric testing
QTest::toString allocates memory by calling qstrdup; that memory must be freed by the caller. Change-Id: I9724db0c617884cf08592968b1411f002ef23204 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
This commit is contained in:
parent
b71c8eb386
commit
59e3073b1c
@ -95,7 +95,8 @@ void tst_toString::numeric()
|
|||||||
QFETCH(T, datum);
|
QFETCH(T, datum);
|
||||||
|
|
||||||
QBENCHMARK {
|
QBENCHMARK {
|
||||||
QTest::toString<T>(datum);
|
auto tst = QTest::toString<T>(datum);
|
||||||
|
delete [] tst;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user