GitHub user zwoop opened an issue:
https://github.com/apache/trafficserver/issues/1308
CID 1368316 & 1368315: Leaks and NULL references
I think this landed recently (TS-5092?), and we have to fix this for 7.1.x.
clang-analyzer also detects the NULL pointer reference.
```C
** CID 1368316: Resource leaks (RESOURCE_LEAK)
/proxy/http/HttpSM.cc: 5049 in HttpSM::do_http_server_open(bool)()
*** CID 1368316: Resource leaks (RESOURCE_LEAK)
/proxy/http/HttpSM.cc: 5049 in HttpSM::do_http_server_open(bool)()
5043 int len = 0;
5044 const char *host =
t_state.hdr_info.server_request.host_get();
5045 if (host && len > 0) {
5046 opt.set_sni_servername(host, len);
5047 }
5048
CID 1368316: Resource leaks (RESOURCE_LEAK)
Failing to save or free storage allocated by
"Layout::relative_to(this->t_state.txn_conf->client_cert_filepath,
this->t_state.txn_conf->client_cert_filename)" leaks it.
5049 ats_scoped_str clientCert(
5050
ats_strdup((Layout::relative_to(t_state.txn_conf->client_cert_filepath,
t_state.txn_conf->client_cert_filename;
5051 opt.set_client_certname(clientCert);
5052 connect_action_handle = sslNetProcessor.connect_re(this,
// state machine
5053
_state.current.server->dst_addr.sa, // addr + port
5054);
** CID 1368315: Null pointer dereferences (FORWARD_NULL)
/proxy/http2/Http2ConnectionState.cc: 217 in
rcv_headers_frame(Http2ConnectionState &, const Http2Frame &)()
*** CID 1368315: Null pointer dereferences (FORWARD_NULL)
/proxy/http2/Http2ConnectionState.cc: 217 in
rcv_headers_frame(Http2ConnectionState &, const Http2Frame &)()
211 if (!stream) {
212 return error;
213 }
214 }
215
216 // keep track of how many bytes we get in the frame
CID 1368315: Null pointer dereferences (FORWARD_NULL)
Dereferencing null pointer "stream".
217 stream->request_header_length += payload_length;
218 if (stream->request_header_length >
Http2::max_request_header_size) {
219 return Http2Error(HTTP2_ERROR_CLASS_STREAM,
HTTP2_ERROR_PROTOCOL_ERROR,
220 "recv headers payload for headers greater
than header length");
221 }
222
```
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---