mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-07 10:49:24 +00:00
lib: ensure locals are inited to NULL
A couple of pointers in do_thread_cancel() we only inited at the start of the function; make sure they're inited during each iteration of the loop. Signed-off-by: Mark Stapp <mstapp@nvidia.com>
This commit is contained in:
parent
9e7103f6b7
commit
7e93a54c6c
@ -1354,9 +1354,9 @@ static void do_thread_cancel(struct thread_master *master)
|
|||||||
struct thread_list_head *list = NULL;
|
struct thread_list_head *list = NULL;
|
||||||
struct thread **thread_array = NULL;
|
struct thread **thread_array = NULL;
|
||||||
struct thread *thread;
|
struct thread *thread;
|
||||||
|
|
||||||
struct cancel_req *cr;
|
struct cancel_req *cr;
|
||||||
struct listnode *ln;
|
struct listnode *ln;
|
||||||
|
|
||||||
for (ALL_LIST_ELEMENTS_RO(master->cancel_req, ln, cr)) {
|
for (ALL_LIST_ELEMENTS_RO(master->cancel_req, ln, cr)) {
|
||||||
/*
|
/*
|
||||||
* If this is an event object cancellation, search
|
* If this is an event object cancellation, search
|
||||||
@ -1379,6 +1379,9 @@ static void do_thread_cancel(struct thread_master *master)
|
|||||||
if (!thread)
|
if (!thread)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
list = NULL;
|
||||||
|
thread_array = NULL;
|
||||||
|
|
||||||
/* Determine the appropriate queue to cancel the thread from */
|
/* Determine the appropriate queue to cancel the thread from */
|
||||||
switch (thread->type) {
|
switch (thread->type) {
|
||||||
case THREAD_READ:
|
case THREAD_READ:
|
||||||
|
Loading…
Reference in New Issue
Block a user