]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug 4861: HTTPMSGLOCK missing pointer safety (#228)
authorAmos Jeffries <yadij@users.noreply.github.com>
Tue, 3 Jul 2018 13:04:43 +0000 (01:04 +1200)
committerAmos Jeffries <yadij@users.noreply.github.com>
Mon, 9 Jul 2018 04:35:02 +0000 (16:35 +1200)
src/HttpMsg.h

index 1cb76270da261641273a7d2e7fde33a5189547e4..d3125b06d1ba456e8808b7633143ba70f1bc63be 100644 (file)
@@ -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 */