]> 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>
Wed, 30 Sep 2015 14:12:55 +0000 (16:12 +0200)
committerFrancesco Chemolli <kinkie@squid-cache.org>
Wed, 30 Sep 2015 14:12:55 +0000 (16:12 +0200)
src/mem/AllocatorProxy.h

index d4303cb214fb05cbb8f0bd8340f6fd2ac837bf38..18faf69434825acdde70dd16346bfe85aa738eb4 100644 (file)
@@ -35,7 +35,10 @@ class MemPoolMeter;
         assert(byteCount == sizeof(CLASS)); \
         return Pool().alloc(); \
     } \
-    void operator delete(void *address) {Pool().freeOne(address);} \
+    void operator delete(void *address) { \
+        if (address) \
+            Pool().freeOne(address); \
+    } \
     private:
 
 namespace Mem