mirror of
https://github.com/SoftEtherVPN/SoftEtherVPN.git
synced 2024-11-22 17:39:53 +03:00
Merge PR #1126: Cedar/Proto.c: fix wrong NULL check in ProtoHandleDatagrams(), found by Coverity
This commit is contained in:
commit
c15a4ba04f
@ -445,14 +445,15 @@ bool ProtoHandleConnection(PROTO *proto, SOCK *sock)
|
|||||||
void ProtoHandleDatagrams(UDPLISTENER *listener, LIST *datagrams)
|
void ProtoHandleDatagrams(UDPLISTENER *listener, LIST *datagrams)
|
||||||
{
|
{
|
||||||
UINT i;
|
UINT i;
|
||||||
|
PROTO *proto;
|
||||||
HASH_LIST *sessions;
|
HASH_LIST *sessions;
|
||||||
PROTO *proto = listener->Param;
|
|
||||||
|
|
||||||
if (proto == NULL || listener == NULL || datagrams == NULL)
|
if (listener == NULL || datagrams == NULL)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
proto = listener->Param;
|
||||||
sessions = proto->Sessions;
|
sessions = proto->Sessions;
|
||||||
|
|
||||||
for (i = 0; i < LIST_NUM(datagrams); ++i)
|
for (i = 0; i < LIST_NUM(datagrams); ++i)
|
||||||
|
Loading…
Reference in New Issue
Block a user