summaryrefslogtreecommitdiffstats
path: root/src/gui/util/qktxhandler.cpp
diff options
context:
space:
mode:
authorMarc Mutz <[email protected]>2025-07-01 14:39:42 +0200
committerMarc Mutz <[email protected]>2025-07-01 19:50:43 +0200
commitfa225324cdb2867c9eb45b3c610651f9871c911a (patch)
tree1f60e4ef337559f46e483dd5e7fd5fa68d0214fd /src/gui/util/qktxhandler.cpp
parent3aa82a0ecf9c7a5cb2a1c7f64261d9b8582645ac (diff)
QClipData: fix incorrect realloc() useHEADdev
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/util/qktxhandler.cpp')
0 files changed, 0 insertions, 0 deletions