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:
Donald Sharp 2021-04-30 14:10:31 -04:00
parent 83187b8285
commit c3c6dbf80a

View File

@ -376,7 +376,6 @@ static int bgp_accept(struct thread *thread)
accept_sock);
return -1;
}
listener->thread = NULL;
thread_add_read(bm->master, bgp_accept, listener, accept_sock,
&listener->thread);
@ -838,7 +837,6 @@ static int bgp_listener(int sock, struct sockaddr *sa, socklen_t salen,
listener->bgp = bgp;
memcpy(&listener->su, sa, salen);
listener->thread = NULL;
thread_add_read(bm->master, bgp_accept, listener, sock,
&listener->thread);
listnode_add(bm->listen_sockets, listener);