Kaydet (Commit) d3581eb7 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

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/71942Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
Reviewed-by: 's avatarStephan Bergmann <sbergman@redhat.com>
üst d27ad84e
...@@ -50,6 +50,7 @@ ...@@ -50,6 +50,7 @@
#include <sal/log.hxx> #include <sal/log.hxx>
#include <osl/thread.h> #include <osl/thread.h>
#include <cstdlib>
#include <typeinfo> #include <typeinfo>
#include <tools/diagnose_ex.h> #include <tools/diagnose_ex.h>
...@@ -116,7 +117,7 @@ OString exceptionToString(const css::uno::Any & caught) ...@@ -116,7 +117,7 @@ OString exceptionToString(const css::uno::Any & caught)
sMessage += " context: "; sMessage += " context: ";
sMessage += pContext; sMessage += pContext;
#if defined __GLIBCXX__ #if defined __GLIBCXX__
delete pContext; std::free(const_cast<char *>(pContext));
#endif #endif
} }
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment