diff options
| author | Donatas Abraitis <donatas@opensourcerouting.org> | 2022-09-02 13:49:10 +0300 | 
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-09-02 13:49:10 +0300 | 
| commit | 1011b31a1c72f0fd92a508c486406f3287a6c8e4 (patch) | |
| tree | bc5f78d93a07fce36828a646d68d2a178d8d57cc /lib | |
| parent | 4ed967b375dd04e78c5f3734780be55dc3eec504 (diff) | |
| parent | 7e93a54c6c65cff58eb42d5f0f81bd9fac42af8d (diff) | |
Merge pull request #11884 from mjstapp/fix_cancel_ptrs
lib: ensure locals are inited to NULL
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/thread.c | 5 | 
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/thread.c b/lib/thread.c index c3613b5b0e..9eac9b410a 100644 --- a/lib/thread.c +++ b/lib/thread.c @@ -1354,9 +1354,9 @@ static void do_thread_cancel(struct thread_master *master)  	struct thread_list_head *list = NULL;  	struct thread **thread_array = NULL;  	struct thread *thread; -  	struct cancel_req *cr;  	struct listnode *ln; +  	for (ALL_LIST_ELEMENTS_RO(master->cancel_req, ln, cr)) {  		/*  		 * If this is an event object cancellation, search @@ -1379,6 +1379,9 @@ static void do_thread_cancel(struct thread_master *master)  		if (!thread)  			continue; +		list = NULL; +		thread_array = NULL; +  		/* Determine the appropriate queue to cancel the thread from */  		switch (thread->type) {  		case THREAD_READ:  | 
