diff options
author | Andrei Golubev <andrei.golubev@qt.io> | 2020-10-09 11:01:16 +0200 |
---|---|---|
committer | Andrei Golubev <andrei.golubev@qt.io> | 2020-10-13 17:04:16 +0200 |
commit | ba511b2fa4782d6618a5261bbbd50f0c57266a3a (patch) | |
tree | 62dd28d3ce8a8fd540e50726b648c989be818424 /cmake/QtAutoDetect.cmake | |
parent | 1ae15edd7e7ec4bd96d3a9a4d6b5793c7f7e8830 (diff) |
Reject overwrites by the same index in QPromise::addResult()
One can call addResult(value, index) twice and consequently set the
value twice by the same index. This seems rather strange and probably
should not be allowed. This commit rejects setting results when there's
already a valid result by that index. Consequently, this fixes memory
leaks caused by N-times-called addResult(..., index)
Fixes: QTBUG-86828
Change-Id: I77494f2cb73ce727ffad721cfcdcaa420899eb25
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
Diffstat (limited to 'cmake/QtAutoDetect.cmake')
0 files changed, 0 insertions, 0 deletions