diff options
| author | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2021-03-03 18:02:32 +0100 |
|---|---|---|
| committer | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2021-03-03 23:41:14 +0100 |
| commit | 90b51219ddc75c4dd2d171f2dba644e67d1e4a62 (patch) | |
| tree | ca31595a3e10a606c8a7630a0f9034956153630f /src/concurrent/qtconcurrentrun.cpp | |
| parent | 0eca1f4a4681b03792f6c3008dd6daf3aa9abedd (diff) | |
QMetaType::create: don't leak memory if copy can't be made
QMetaType::construct will return nullptr if a copy is requested but
if there is no copy constructor. In that case, the memory allocated in
QMetaType::create will be leaked.
This case is covered in the unit tests in
template<>
void testCreateHelper<QMetaType::Void>()
so we can't assert in construct that a copy constructor is present if
a copy is requested.
Fixes static analyzer warning 618b1e6877f737df57c39fd35ad91cd4.
Pick-to: 6.1
Change-Id: Ic439b36b1f120b9d0f888efaeab2801d8acc13de
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/concurrent/qtconcurrentrun.cpp')
0 files changed, 0 insertions, 0 deletions
