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_3_5_28~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5f7b22d0794a3bf8f60c6729fd5e8b748a543706;p=thirdparty%2Fsquid.git Bug 4861: HTTPMSGLOCK missing pointer safety (#228) --- diff --git a/src/HttpMsg.h b/src/HttpMsg.h index 34f7a624fb..1694f136a9 100644 --- a/src/HttpMsg.h +++ b/src/HttpMsg.h @@ -104,7 +104,7 @@ protected: int httpMsgIsolateHeaders(const char **parse_start, int len, const char **blk_start, const char **blk_end); #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 */