1
0
mirror of https://github.com/SoftEtherVPN/SoftEtherVPN.git synced 2024-12-26 01:59:53 +03:00

Merge PR #1126: Cedar/Proto.c: fix wrong NULL check in ProtoHandleDatagrams(), found by Coverity

This commit is contained in:
Davide Beatrici 2020-05-12 23:50:30 +02:00 committed by GitHub
commit c15a4ba04f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -445,14 +445,15 @@ bool ProtoHandleConnection(PROTO *proto, SOCK *sock)
void ProtoHandleDatagrams(UDPLISTENER *listener, LIST *datagrams)
{
UINT i;
PROTO *proto;
HASH_LIST *sessions;
PROTO *proto = listener->Param;
if (proto == NULL || listener == NULL || datagrams == NULL)
if (listener == NULL || datagrams == NULL)
{
return;
}
proto = listener->Param;
sessions = proto->Sessions;
for (i = 0; i < LIST_NUM(datagrams); ++i)