summaryrefslogtreecommitdiff
path: root/salhelper
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2015-08-06 10:03:01 +0300
committerTor Lillqvist <tml@collabora.com>2015-08-06 10:24:49 +0300
commit3a2929e3f8dd3b0c57bc0c5e8496d23b6f63d925 (patch)
tree2fe627b1dd751cb22783b9ca7fefb7b5f2d03eca /salhelper
parent08aab3de3ac9d2d284ebfbddb92874853451ddb0 (diff)
If we want this to crash intentionally, use abort() then
free(NULL) does not crash, it is defined to do nothing. Did I not know that in 2010? Change-Id: Ia6c4817ea87b646d643a19daabfe7850c5416cc8
Diffstat (limited to 'salhelper')
-rw-r--r--salhelper/source/simplereferenceobject.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/salhelper/source/simplereferenceobject.cxx b/salhelper/source/simplereferenceobject.cxx
index f2ec5a792477..95e8b6f699d9 100644
--- a/salhelper/source/simplereferenceobject.cxx
+++ b/salhelper/source/simplereferenceobject.cxx
@@ -62,15 +62,15 @@ void SimpleReferenceObject::operator delete(void * pPtr, std::nothrow_t const &)
#ifdef _MSC_VER
/* This operator is supposed to be unimplemented, but that now leads
- * to compilation and/or linking errors with MSVC2008. (Don't know
- * about MSVC2010.) As it can be left unimplemented just fine with
- * gcc, presumably it is never called. So do implement it then to
- * avoid the compilation and/or linking errors, but make it crash
- * intentionally if called.
+ * to compilation and/or linking errors with MSVC2008. Problem still
+ * there with MSVC2013. As it can be left unimplemented just fine with
+ * other compilers, presumably it is never called. So do implement it
+ * then to avoid the compilation and/or linking errors, but make it
+ * crash intentionally if called.
*/
void SimpleReferenceObject::operator delete[](void * /* pPtr */)
{
- free(NULL);
+ abort();
}
#endif