This is an automated email from the ASF dual-hosted git repository. borisk pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/xerces-c.git
commit 45bed32af312124827cc85c68064267daf7a8102 Author: Scott Cantor <scan...@apache.org> AuthorDate: Mon Dec 30 15:17:35 2019 +0000 XERCESC-2168 - Memory leak in ValueVectorOf git-svn-id: https://svn.apache.org/repos/asf/xerces/c/trunk@1872116 13f79535-47bb-0310-9956-ffa450edef68 --- src/xercesc/util/ValueVectorOf.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/xercesc/util/ValueVectorOf.c b/src/xercesc/util/ValueVectorOf.c index 364359e..1aca736 100644 --- a/src/xercesc/util/ValueVectorOf.c +++ b/src/xercesc/util/ValueVectorOf.c @@ -81,7 +81,6 @@ template <class TElem> ValueVectorOf<TElem>::~ValueVectorOf() } - // --------------------------------------------------------------------------- // ValueVectorOf: Operators // --------------------------------------------------------------------------- @@ -90,6 +89,11 @@ ValueVectorOf<TElem>::operator=(const ValueVectorOf<TElem>& toAssign) { if (this == &toAssign) return *this; + + if (fCallDestructor) { + for (XMLSize_t index=fMaxCount; index > 0; index--) + fElemList[index-1].~TElem(); + } // Reallocate if required if (fMaxCount < toAssign.fCurCount) --------------------------------------------------------------------- To unsubscribe, e-mail: c-dev-unsubscr...@xerces.apache.org For additional commands, e-mail: c-dev-h...@xerces.apache.org