Repository: trafficserver Updated Branches: refs/heads/master 8939a3c68 -> 559766411
TS-3822 clang-analyzer: Value stored to 'stream' during its initialization is never read Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/55976641 Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/55976641 Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/55976641 Branch: refs/heads/master Commit: 559766411410f36a82f28632f8308cc2d20e74b0 Parents: 8939a3c Author: Leif Hedstrom <[email protected]> Authored: Wed Aug 5 21:25:17 2015 -0600 Committer: Leif Hedstrom <[email protected]> Committed: Wed Aug 5 21:25:17 2015 -0600 ---------------------------------------------------------------------- proxy/http2/Http2ConnectionState.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/55976641/proxy/http2/Http2ConnectionState.cc ---------------------------------------------------------------------- diff --git a/proxy/http2/Http2ConnectionState.cc b/proxy/http2/Http2ConnectionState.cc index 4244468..3d94dfd 100644 --- a/proxy/http2/Http2ConnectionState.cc +++ b/proxy/http2/Http2ConnectionState.cc @@ -173,13 +173,13 @@ rcv_headers_frame(Http2ClientSession &cs, Http2ConnectionState &cstate, const Ht return Http2Error(HTTP2_ERROR_CLASS_CONNECTION, HTTP2_ERROR_PROTOCOL_ERROR); } - Http2Stream *stream = cstate.find_stream(id); if (id <= cstate.get_latest_stream_id()) { return Http2Error(HTTP2_ERROR_CLASS_STREAM, HTTP2_ERROR_STREAM_CLOSED); } // Create new stream - stream = cstate.create_stream(id); + Http2Stream *stream = cstate.create_stream(id); + if (!stream) { return Http2Error(HTTP2_ERROR_CLASS_CONNECTION, HTTP2_ERROR_PROTOCOL_ERROR); }
