mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-14 10:37:29 +00:00
bgpd: listener thread pointer is already NULL
FRR in thread.c clears the passed in double pointer when we pull it off the ready queue and pass it back to the calling function via thread_fetch(). Signed-off-by: Donald Sharp <sharpd@nvidia.com>
This commit is contained in:
parent
83187b8285
commit
c3c6dbf80a
@ -376,7 +376,6 @@ static int bgp_accept(struct thread *thread)
|
|||||||
accept_sock);
|
accept_sock);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
listener->thread = NULL;
|
|
||||||
|
|
||||||
thread_add_read(bm->master, bgp_accept, listener, accept_sock,
|
thread_add_read(bm->master, bgp_accept, listener, accept_sock,
|
||||||
&listener->thread);
|
&listener->thread);
|
||||||
@ -838,7 +837,6 @@ static int bgp_listener(int sock, struct sockaddr *sa, socklen_t salen,
|
|||||||
listener->bgp = bgp;
|
listener->bgp = bgp;
|
||||||
|
|
||||||
memcpy(&listener->su, sa, salen);
|
memcpy(&listener->su, sa, salen);
|
||||||
listener->thread = NULL;
|
|
||||||
thread_add_read(bm->master, bgp_accept, listener, sock,
|
thread_add_read(bm->master, bgp_accept, listener, sock,
|
||||||
&listener->thread);
|
&listener->thread);
|
||||||
listnode_add(bm->listen_sockets, listener);
|
listnode_add(bm->listen_sockets, listener);
|
||||||
|
Loading…
Reference in New Issue
Block a user