trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shinr...@apache.org
Subject trafficserver git commit: Add a check to block a clang-analyzer null dereference.
Date Mon, 20 Apr 2015 22:49:48 GMT
Repository: trafficserver
Updated Branches:
  refs/heads/master 07e920707 -> 0694b3537


Add a check to block a clang-analyzer null dereference.


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/0694b353
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/0694b353
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/0694b353

Branch: refs/heads/master
Commit: 0694b3537ad623c1d3175ecd5e1881a1fd97affc
Parents: 07e9207
Author: shinrich <shinrich@yahoo-inc.com>
Authored: Mon Apr 20 17:47:54 2015 -0500
Committer: shinrich <shinrich@yahoo-inc.com>
Committed: Mon Apr 20 17:49:34 2015 -0500

----------------------------------------------------------------------
 proxy/http/HttpClientSession.cc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/0694b353/proxy/http/HttpClientSession.cc
----------------------------------------------------------------------
diff --git a/proxy/http/HttpClientSession.cc b/proxy/http/HttpClientSession.cc
index 742a883..c332e64 100644
--- a/proxy/http/HttpClientSession.cc
+++ b/proxy/http/HttpClientSession.cc
@@ -220,7 +220,8 @@ HttpClientSession::do_io_write(Continuation *c, int64_t nbytes, IOBufferReader
*
   /* conditionally set the tcp initial congestion window
      before our first write. */
   DebugHttpSsn("tcp_init_cwnd_set %d\n", (int)tcp_init_cwnd_set);
-  if (!tcp_init_cwnd_set) {
+  // Checking c to avoid clang detected NULL derference path
+  if (c && !tcp_init_cwnd_set) {
     tcp_init_cwnd_set = true;
     set_tcp_init_cwnd();
   }


Mime
View raw message