diff options
author | Marc Mutz <[email protected]> | 2025-07-01 14:17:26 +0200 |
---|---|---|
committer | Marc Mutz <[email protected]> | 2025-07-01 19:50:42 +0200 |
commit | 3aa82a0ecf9c7a5cb2a1c7f64261d9b8582645ac (patch) | |
tree | 4aed091984c30b38fa92166d6520ce16063ce628 /src/gui/doc/snippets/textdocument-frames/mainwindow.h | |
parent | afd44ac9f582fc7a81465da8e6c6cf72a43db03b (diff) |
QXmlStream: fix incorrect use of realloc()
One must never store the result of realloc() back into the first
realloc() argument, because, if relloc() fails, one still has to
free() the old pointer, but one has just overwritten its value with
nullptr, leaking memory.
To fix, first check, and then assign.
Found in manual review of realloc() uses.
Amends the start of the public history.
Pick-to: 6.10 6.9 6.8 6.5
Change-Id: Id6d369116d4e01fb9cb1d6db3627b9956d4b6201
Reviewed-by: Thiago Macieira <[email protected]>
Diffstat (limited to 'src/gui/doc/snippets/textdocument-frames/mainwindow.h')
0 files changed, 0 insertions, 0 deletions