diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2019-05-08 08:46:06 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2019-05-08 13:20:06 +0200 |
commit | d3581eb79e204419a6906004c199512c1fa48a2c (patch) | |
tree | c33cc4f434698423eeb64b7ffb0de25ed825d016 /tools | |
parent | d27ad84ec7a0aafb07d6a6152c686f4bc802f661 (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.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
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 <sal/log.hxx> #include <osl/thread.h> +#include <cstdlib> #include <typeinfo> #include <tools/diagnose_ex.h> @@ -116,7 +117,7 @@ OString exceptionToString(const css::uno::Any & caught) sMessage += " context: "; sMessage += pContext; #if defined __GLIBCXX__ - delete pContext; + std::free(const_cast<char *>(pContext)); #endif } { |