From: Amos Jeffries Date: Tue, 3 Jul 2018 13:04:43 +0000 (+1200) Subject: Bug 4861: HTTPMSGLOCK missing pointer safety (#228) X-Git-Tag: SQUID_4_2~18 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3eeda0eb69d483ca83e7b938dcb7c45dddbcb9fa;p=thirdparty%2Fsquid.git Bug 4861: HTTPMSGLOCK missing pointer safety (#228) --- diff --git a/src/HttpMsg.h b/src/HttpMsg.h index 1cb76270da..d3125b06d1 100644 --- a/src/HttpMsg.h +++ b/src/HttpMsg.h @@ -128,7 +128,7 @@ protected: }; #define HTTPMSGUNLOCK(a) if (a) { if ((a)->unlock() == 0) delete (a); (a)=NULL; } -#define HTTPMSGLOCK(a) (a)->lock() +#define HTTPMSGLOCK(a) if (a) { (a)->lock(); } #endif /* SQUID_HTTPMSG_H */