You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by bc...@apache.org on 2017/05/10 17:02:49 UTC
[trafficserver] branch master updated: coverity 1021746:
Uninitialized pointer field
This is an automated email from the ASF dual-hosted git repository.
bcall pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/master by this push:
new 3d2993f coverity 1021746: Uninitialized pointer field
3d2993f is described below
commit 3d2993f7be4b6165bb94a7a194f91047e4613ba9
Author: Bryan Call <bc...@apache.org>
AuthorDate: Wed May 10 11:11:16 2017 -0400
coverity 1021746: Uninitialized pointer field
---
iocore/net/P_Socks.h | 31 +++++++++++--------------------
1 file changed, 11 insertions(+), 20 deletions(-)
diff --git a/iocore/net/P_Socks.h b/iocore/net/P_Socks.h
index ceb4369..59bf8fb 100644
--- a/iocore/net/P_Socks.h
+++ b/iocore/net/P_Socks.h
@@ -108,31 +108,31 @@ class UnixNetVConnection;
typedef UnixNetVConnection SocksNetVC;
struct SocksEntry : public Continuation {
- MIOBuffer *buf;
- IOBufferReader *reader;
+ MIOBuffer *buf = nullptr;
+ IOBufferReader *reader = nullptr;
- SocksNetVC *netVConnection;
+ SocksNetVC *netVConnection = nullptr;
// Changed from @a ip and @a port.
IpEndpoint target_addr; ///< Original target address.
// Changed from @a server_ip, @a server_port.
IpEndpoint server_addr; ///< Origin server address.
- int nattempts;
+ int nattempts = 0;
Action action_;
- int lerrno;
- Event *timeout;
- unsigned char version;
+ int lerrno = 0;
+ Event *timeout = nullptr;
+ unsigned char version = 5;
- bool write_done;
+ bool write_done = false;
- SocksAuthHandler auth_handler;
- unsigned char socks_cmd;
+ SocksAuthHandler auth_handler = nullptr;
+ unsigned char socks_cmd = NORMAL_SOCKS;
#ifdef SOCKS_WITH_TS
// socks server selection:
- ParentConfigParams *server_params;
+ ParentConfigParams *server_params = nullptr;
HttpRequestData req_data; // We dont use any http specific fields.
ParentResult server_result;
#endif
@@ -144,15 +144,6 @@ struct SocksEntry : public Continuation {
void free();
SocksEntry()
- : Continuation(nullptr),
- netVConnection(0),
- nattempts(0),
- lerrno(0),
- timeout(0),
- version(5),
- write_done(false),
- auth_handler(nullptr),
- socks_cmd(NORMAL_SOCKS)
{
memset(&target_addr, 0, sizeof(target_addr));
memset(&server_addr, 0, sizeof(server_addr));
--
To stop receiving notification emails like this one, please contact
['"commits@trafficserver.apache.org" <co...@trafficserver.apache.org>'].