mirror of
https://github.com/SoftEtherVPN/SoftEtherVPN.git
synced 2024-11-25 02:49:52 +03:00
fix potential null pointer dereference found by Coverity
CID 355460 (#1 of 1): Dereference before null check (REVERSE_INULL)check_after_deref: Null-checking p suggests that it may be null, but it has already been dereferenced on all paths leading to the check. 737 if (p == NULL) 738 { 739 return false; 740 }
This commit is contained in:
parent
a08857150b
commit
2715d80e18
@ -721,6 +721,12 @@ bool PPPProcessRetransmissions(PPP_SESSION *p)
|
||||
// Send the PPP Echo Request
|
||||
bool PPPSendEchoRequest(PPP_SESSION *p)
|
||||
{
|
||||
// Validate arguments
|
||||
if (p == NULL)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
UINT64 now = Tick64();
|
||||
if (p->NextEchoSendTime == 0 || now >= p->NextEchoSendTime)
|
||||
{
|
||||
@ -733,12 +739,6 @@ bool PPPSendEchoRequest(PPP_SESSION *p)
|
||||
AddInterrupt(p->Ipc->Interrupt, p->NextEchoSendTime);
|
||||
}
|
||||
|
||||
// Validate arguments
|
||||
if (p == NULL)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
pp = ZeroMalloc(sizeof(PPP_PACKET));
|
||||
pp->Protocol = PPP_PROTOCOL_LCP;
|
||||
pp->IsControl = true;
|
||||
|
Loading…
Reference in New Issue
Block a user