diff options
author | Marc Mutz <[email protected]> | 2025-07-01 14:39:42 +0200 |
---|---|---|
committer | Marc Mutz <[email protected]> | 2025-07-01 19:50:43 +0200 |
commit | fa225324cdb2867c9eb45b3c610651f9871c911a (patch) | |
tree | 1f60e4ef337559f46e483dd5e7fd5fa68d0214fd /src/gui/accessible/qaccessiblebridgeutils.cpp | |
parent | 3aa82a0ecf9c7a5cb2a1c7f64261d9b8582645ac (diff) |
The realloc() calls unconditionally overwrote m_spans with the result
of realloc() before checking whether realloc() succeeded. This way,
they leaked memory if realloc() did fail (they lost their handle on
the old, still-existing memory block).
Fix by piping the realloc() result through q_check_ptr(), which
inserts Q_CHECK_PTR(), so we don't need a temporary variable here.
As a drive-by, replace C-style cast with static_cast and fix spacing
around binary operators.
Amends the start of the public history.
Pick-to: 6.10 6.9 6.8 6.5
Change-Id: Ia77a246bf6eec4e29ea6a01f999d3f4a43e0ee1c
Reviewed-by: Thiago Macieira <[email protected]>
Diffstat (limited to 'src/gui/accessible/qaccessiblebridgeutils.cpp')
0 files changed, 0 insertions, 0 deletions