From ffb76029579b34004004b58d6ad6a08e84f70601 Mon Sep 17 00:00:00 2001 From: codereader Date: Sat, 10 Sep 2022 10:53:33 +0200 Subject: [PATCH] #6097: Remove the dangerous copy-constructor which will trigger a crash as soon as the second copy goes out of scope. --- libs/xmlutil/Document.cpp | 4 ---- libs/xmlutil/Document.h | 3 --- 2 files changed, 7 deletions(-) diff --git a/libs/xmlutil/Document.cpp b/libs/xmlutil/Document.cpp index 1382299c78..eb246aefb6 100644 --- a/libs/xmlutil/Document.cpp +++ b/libs/xmlutil/Document.cpp @@ -64,10 +64,6 @@ Document::Document(std::istream& stream) : xmlFreeParserCtxt(ctxt); } -Document::Document(const Document& other) : - _xmlDoc(other._xmlDoc) -{} - Document::~Document() { if (_xmlDoc != nullptr) diff --git a/libs/xmlutil/Document.h b/libs/xmlutil/Document.h index 476a15e25c..10b0c38262 100644 --- a/libs/xmlutil/Document.h +++ b/libs/xmlutil/Document.h @@ -41,9 +41,6 @@ class Document // stream data into memory, and parse it chunk by chunk. Document(std::istream& stream); - // Copy constructor (note: does not create an actual copy of the internal xmlDoc) - Document(const Document& other); - // Destructor, frees the xmlDocPtr ~Document();