summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2019-05-08 08:46:06 +0200
committerMichael Meeks <michael.meeks@collabora.com>2019-08-05 21:06:51 -0400
commit27cc656574f7e0242fe13b37b913155e2d532ff6 (patch)
tree8c3e71d2a62d18009afddf11cd76cbb58e6cbf20 /tools
parent2b604717d6d2dc5b8565fada6b311acd923643e7 (diff)
AddressSanitizer: alloc-dealloc-mismatch (malloc vs operator delete)
__cxa_demangle uses malloc/free for memory management, see <http://itanium-cxx-abi.github.io/cxx-abi/abi.html#demangler> Change-Id: I57f8465d1c70fbef4537068fd3aefc52295e1c63 Reviewed-on: https://gerrit.libreoffice.org/71942 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/source/debug/debug.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/source/debug/debug.cxx b/tools/source/debug/debug.cxx
index c802c79761a8..0691ee7a05a0 100644
--- a/tools/source/debug/debug.cxx
+++ b/tools/source/debug/debug.cxx
@@ -62,6 +62,7 @@
#include <sal/macros.h>
#include <osl/thread.h>
+#include <cstdlib>
#include <typeinfo>
#include <vector>
@@ -129,7 +130,7 @@ OString exceptionToString(const css::uno::Any & caught)
sMessage += " context: ";
sMessage += pContext;
#if defined __GLIBCXX__
- delete pContext;
+ std::free(const_cast<char *>(pContext));
#endif
}
{