Commit 0692398b authored by Friedemann Kleint's avatar Friedemann Kleint Committed by Qt Cherry-pick Bot
Browse files

Fix a double deletion in QDomAttr::setNodeValue()

Check the reference count before deleting. Patch
as contributed on bug report.

Fixes: QTBUG-86547
Change-Id: I2cb197e3eeda7ade2442c23f6b4f1ae6ff2ff810
Reviewed-by: default avatarLars Knoll <>
(cherry picked from commit af22ccf5

Reviewed-by: default avatarQt Cherry-pick Bot <>
parent fa7a8395
......@@ -4117,7 +4117,9 @@ void QDomAttrPrivate::setNodeValue(const QString& v)
// keep the refcount balanced: appendChild() does a ref anyway.
if (first) {
delete removeChild(first);
auto removed = removeChild(first);
if (removed && !removed->ref)
delete removed;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment