mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-05-25 22:00:41 +00:00
bgpd: fix deference before check in rpki_create_socket
Fix deference before check coverity scanner issue 1575918 in
rpki_create_socket()
Fixes: a951752d4a
("bgpd: create cache server socket in vrf")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
This commit is contained in:
parent
8c8bb3568a
commit
39c8c97d41
@ -1276,7 +1276,7 @@ static int rpki_create_socket(void *_cache)
|
||||
{
|
||||
struct timeval prev_snd_tmout, prev_rcv_tmout, timeout;
|
||||
struct cache *cache = (struct cache *)_cache;
|
||||
struct rpki_vrf *rpki_vrf = cache->rpki_vrf;
|
||||
struct rpki_vrf *rpki_vrf;
|
||||
struct tr_tcp_config *tcp_config;
|
||||
struct addrinfo *res = NULL;
|
||||
struct addrinfo hints = {};
|
||||
@ -1294,6 +1294,8 @@ static int rpki_create_socket(void *_cache)
|
||||
if (!cache)
|
||||
return -1;
|
||||
|
||||
rpki_vrf = cache->rpki_vrf;
|
||||
|
||||
if (rpki_vrf->vrfname == NULL)
|
||||
vrf = vrf_lookup_by_id(VRF_DEFAULT);
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user