trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sor...@apache.org
Subject [trafficserver] 01/03: TS-4699: Fix clang-analyzer
Date Wed, 28 Sep 2016 17:14:43 GMT
This is an automated email from the ASF dual-hosted git repository.

sorber pushed a commit to branch master
in repository https://git-dual.apache.org/repos/asf/trafficserver.git

commit 622677b219268cdd4e86e7d21f7e24ade52700aa
Author: Phil Sorber <sorber@apache.org>
AuthorDate: Tue Sep 27 23:21:00 2016 -0600

    TS-4699: Fix clang-analyzer
---
 lib/atscppapi/examples/websocket/WebSocket.cc | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/lib/atscppapi/examples/websocket/WebSocket.cc b/lib/atscppapi/examples/websocket/WebSocket.cc
index c41352f..ee2ea54 100644
--- a/lib/atscppapi/examples/websocket/WebSocket.cc
+++ b/lib/atscppapi/examples/websocket/WebSocket.cc
@@ -28,13 +28,18 @@
 // DISCLAIMER: this is intended for demonstration purposes only and
 // does not pretend to implement a complete (or useful) server.
 
+namespace
+{
+GlobalPlugin *plugin;
+}
+
 using namespace atscppapi;
 
 void
 TSPluginInit(int argc, const char *argv[])
 {
   RegisterGlobalPlugin("CPP_Example_WebSocket", "apache", "dev@trafficserver.apache.org");
-  new WebSocketInstaller();
+  plugin = new WebSocketInstaller(); // We keep a pointer to this so that clang-analyzer
doesn't think it's a leak
 }
 
 // WebSocketInstaller

-- 
To stop receiving notification emails like this one, please contact
"commits@trafficserver.apache.org" <commits@trafficserver.apache.org>.

Mime
View raw message