From: Francesco Chemolli Date: Thu, 1 Oct 2015 11:01:25 +0000 (-0700) Subject: Align behavior of MEMPROXY_CLASS's operator delete with ::delete on nullptr X-Git-Tag: SQUID_3_5_10~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f8226ff54e8eb62732dc4cc33e7b40155e58fa09;p=thirdparty%2Fsquid.git Align behavior of MEMPROXY_CLASS's operator delete with ::delete on nullptr --- diff --git a/include/MemPool.h b/include/MemPool.h index 00514d86eb..e140e692de 100644 --- a/include/MemPool.h +++ b/include/MemPool.h @@ -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