1
0
mirror of https://github.com/SoftEtherVPN/SoftEtherVPN.git synced 2024-09-19 18:20:40 +03:00

src/Cedar/Nat.c: resolve possible null dereference

found by coverity
This commit is contained in:
Ilya Shipitsin 2018-08-13 15:40:17 +05:00
parent 937da4a746
commit ff1470cdce

View File

@ -299,7 +299,7 @@ RPC *NatAdminConnect(CEDAR *cedar, char *hostname, UINT port, void *hashed_passw
// RPC server function // RPC server function
PACK *NiRpcServer(RPC *r, char *name, PACK *p) PACK *NiRpcServer(RPC *r, char *name, PACK *p)
{ {
NAT *n = (NAT *)r->Param; NAT *n;
PACK *ret; PACK *ret;
UINT err; UINT err;
bool ok; bool ok;
@ -309,6 +309,7 @@ PACK *NiRpcServer(RPC *r, char *name, PACK *p)
return NULL; return NULL;
} }
n = (NAT *)r->Param;
ret = NewPack(); ret = NewPack();
err = ERR_NO_ERROR; err = ERR_NO_ERROR;
ok = false; ok = false;