commit 5f7b22d0794a3bf8f60c6729fd5e8b748a543706 Author: Amos Jeffries Date: 2018-07-04 01:04:43 +1200 Bug 4861: HTTPMSGLOCK missing pointer safety (#228) diff --git a/src/HttpMsg.h b/src/HttpMsg.h index 34f7a62..1694f13 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 */