]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Align behavior of MEMPROXY_CLASS's operator delete with ::delete on nullptr
authorFrancesco Chemolli <kinkie@squid-cache.org>
Thu, 1 Oct 2015 11:01:25 +0000 (04:01 -0700)
committerAmos Jeffries <squid3@treenet.co.nz>
Thu, 1 Oct 2015 11:01:25 +0000 (04:01 -0700)
include/MemPool.h

index 00514d86eb406a7c9579e0deba3e657c68a2b9a6..e140e692de7dde73e05d69d19448eec784252fb0 100644 (file)
@@ -319,7 +319,8 @@ CLASS::operator new (size_t byteCount) \
 void \
 CLASS::operator delete (void *address) \
 { \
-    Pool().freeOne(address); \
+    if (address) \
+        Pool().freeOne(address); \
 }
 
 /// \ingroup MemPoolsAPI