[qt/qt/qtsvg]: Summary of bulk changes made
KDE Git Services - Bulk Change <[email protected]>
| Newsgroups | gmane.comp.kde.cvs |
|---|---|
| Message-ID | <[email protected]> |
Git repository change summary for qt/qt/qtsvg Pushed by mirror-service into branch '6.11'. Changed from 72c1dd63a166493a4ff791ae05ac094ace74b504 to 50ca3836f3861ca4a06a9dcee925874fd8562adc Acknowledgement was received that this change introduces only existing code that has been pushed to another public open source repository. This change contains the following new commits: Git commit 50ca3836f3861ca4a06a9dcee925874fd8562adc by Qt Cherry-pick Bot (on behalf of Marc Mutz) on 13/08/2026 at 23:13.. QSvgHandler: make clear when document() ownership is transferred Previously, QSvgHandler assumed that someone would call document() and assume ownership of the QSvgDocument. As a result, while QSvgHandler deleted the document in error cases (potentially causing earlier callers of document() that held on to the pointer to dangle), it didn't in its destructor. As a direct consequence, if nobody took ownership of document() before ~QSvgHandler() runs, the document was leaked. That this is not just a theoretical issue was shown by tst_QSvgHandler itself (of all cases), where testCreateAnimateTransformNode() didn't take ownership, and therefore produced leaks. As a fix, make QSvgHandler own the QSvgDocument and document() just observe the stored object. Add a new function, takeDocument(), which actually transfers ownership of the document to the caller, resetting QSvgHandler::m_doc, so any further use doesn't use a potentially dangling pointer. This fixes the remaining asan-reported leaks in tst_QSvgHandler. Amends the start of the public history. Pick-to: 6.8 Change-Id: I1b207378ba1fec0d355f0bbce5376de4c5c4ed65 Reviewed-by: Robert Löhning <[email protected]> (cherry picked from commit 390b0b91e98ba2f5a3b0a4d616c0b3930f2f3207) Reviewed-by: Qt Cherry-pick Bot <[email protected]> (cherry picked from commit 5b03bef6fb3740a1d142d0e23689a04061389ef7) https://invent.kde.org/qt/qt/qtsvg/-/commit/50ca3836f3861ca4a06a9dcee925874fd8562adc