From d3581eb79e204419a6906004c199512c1fa48a2c Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Wed, 8 May 2019 08:46:06 +0200 Subject: AddressSanitizer: alloc-dealloc-mismatch (malloc vs operator delete) __cxa_demangle uses malloc/free for memory management, see Change-Id: I57f8465d1c70fbef4537068fd3aefc52295e1c63 Reviewed-on: https://gerrit.libreoffice.org/71942 Reviewed-by: Noel Grandin Tested-by: Jenkins Reviewed-by: Stephan Bergmann --- tools/source/debug/debug.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tools/source') diff --git a/tools/source/debug/debug.cxx b/tools/source/debug/debug.cxx index 290e1a88a384..fdfd7259d3cf 100644 --- a/tools/source/debug/debug.cxx +++ b/tools/source/debug/debug.cxx @@ -50,6 +50,7 @@ #include #include +#include #include #include @@ -116,7 +117,7 @@ OString exceptionToString(const css::uno::Any & caught) sMessage += " context: "; sMessage += pContext; #if defined __GLIBCXX__ - delete pContext; + std::free(const_cast(pContext)); #endif } { -- cgit