summaryrefslogtreecommitdiff
path: root/compilerplugins
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-08-30 12:46:38 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-08-30 13:23:15 +0200
commit80dd56035e91666efa551c1e4dd4341d30c06510 (patch)
tree89c90cbd761bd6e22d7bfe2a391cf8aea76cb0d4 /compilerplugins
parent4e825d97a8423c9493c5f6f4ac0493b8799f86f6 (diff)
fix ScJumpMatrixToken memory handling
ScJumpMatrixToken unconditionally deletes the ScJumpMatrix pointer it receives. But it's copy constructor also just copies that pointer, meaning that we could end up freeing that pointer twice. ScJumpMatrix has no copy constructor, so I just managed it via shared_ptr. Change-Id: I9cf13312afb4f2869fdc878e5f34060614e31842 Reviewed-on: https://gerrit.libreoffice.org/41728 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'compilerplugins')
-rw-r--r--compilerplugins/clang/useuniqueptr.cxx6
1 files changed, 0 insertions, 6 deletions
diff --git a/compilerplugins/clang/useuniqueptr.cxx b/compilerplugins/clang/useuniqueptr.cxx
index e47ebd23450a..0f6937f182b2 100644
--- a/compilerplugins/clang/useuniqueptr.cxx
+++ b/compilerplugins/clang/useuniqueptr.cxx
@@ -127,15 +127,9 @@ void UseUniquePtr::CheckForSingleUnconditionalDelete(const CXXDestructorDecl* de
// something platform-specific
if (loplugin::hasPathnamePrefix(aFileName, SRCDIR "/hwpfilter/source/htags.h"))
return;
- // @TODO there is clearly a bug in the ownership here, the operator= method cannot be right
- if (loplugin::hasPathnamePrefix(aFileName, SRCDIR "/include/formula/formdata.hxx"))
- return;
// passes pointers to member fields
if (loplugin::hasPathnamePrefix(aFileName, SRCDIR "/sd/inc/sdpptwrp.hxx"))
return;
- // @TODO there is clearly a bug in the ownership here, the ScJumpMatrixToken copy constructor cannot be right
- if (loplugin::hasPathnamePrefix(aFileName, SRCDIR "/sc/inc/token.hxx"))
- return;
// @TODO intrusive linked-lists here, with some trickiness
if (loplugin::hasPathnamePrefix(aFileName, SRCDIR "/sw/source/filter/html/parcss1.hxx"))
return;