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

This commit is contained in:
Davide Beatrici authored and GitHub committed 2020-05-12 23:50:30 +02:00
commit c15a4ba04f
1 file changed
+3 -2
+3 -2
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)