1
0
mirror of https://github.com/SoftEtherVPN/SoftEtherVPN.git synced 2025-07-07 16:25:01 +03:00

Merge pull request #275 from chipitsine/master

cppcheck findings
This commit is contained in:
Moataz Elmasry
2018-02-01 00:06:08 +01:00
committed by GitHub
7 changed files with 21 additions and 11 deletions

View File

@ -6652,7 +6652,10 @@ SOCK *SocksConnectEx2(CONNECTION *c, char *proxy_host_name, UINT proxy_port,
if (c == NULL || proxy_host_name == NULL || proxy_port == 0 || server_host_name == NULL
|| server_port == 0)
{
c->Err = ERR_PROXY_CONNECT_FAILED;
if (c != NULL)
{
c->Err = ERR_PROXY_CONNECT_FAILED;
}
return NULL;
}
@ -6846,7 +6849,10 @@ SOCK *ProxyConnectEx2(CONNECTION *c, char *proxy_host_name, UINT proxy_port,
if (c == NULL || proxy_host_name == NULL || proxy_port == 0 || server_host_name == NULL ||
server_port == 0)
{
c->Err = ERR_PROXY_CONNECT_FAILED;
if( c != NULL)
{
c->Err = ERR_PROXY_CONNECT_FAILED;
}
return NULL;
}
if (username != NULL && password != NULL &&