From 5f7b22d0794a3bf8f60c6729fd5e8b748a543706 Mon Sep 17 00:00:00 2001 From: Amos Jeffries Date: Wed, 4 Jul 2018 01:04:43 +1200 Subject: [PATCH] Bug 4861: HTTPMSGLOCK missing pointer safety (#228) --- src/HttpMsg.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/HttpMsg.h b/src/HttpMsg.h index 34f7a624fbb..1694f136a93 100644 --- a/src/HttpMsg.h +++ b/src/HttpMsg.h @@ -104,7 +104,7 @@ class HttpMsg : public RefCountable 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 */