summaryrefslogtreecommitdiffstats
path: root/zebra/main.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2018-02-05 16:40:09 +0100
committerDonald Sharp <sharpd@cumulusnetworks.com>2018-03-09 17:07:41 +0100
commite208c8f94392286aaf77c6d8f2a8b4d22fa3f1d7 (patch)
tree1b21d5dfb0acb565aba34b27849fe5bc8c1e28c5 /zebra/main.c
parentMerge pull request #1808 from qlyoung/debug-mt-safe (diff)
downloadfrr-e208c8f94392286aaf77c6d8f2a8b4d22fa3f1d7.tar.xz
frr-e208c8f94392286aaf77c6d8f2a8b4d22fa3f1d7.zip
bgpd, lib, zebra: Switch to work_queue_free_and_null
The work_queue_free function free'd up the wq pointer but did not set it too NULL. This of course causes situations where we may use the work_queue after it is freed. Let's modify the work_queue to set the pointer for you. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'zebra/main.c')
-rw-r--r--zebra/main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/zebra/main.c b/zebra/main.c
index 6a08247f1..00d853ea2 100644
--- a/zebra/main.c
+++ b/zebra/main.c
@@ -140,7 +140,7 @@ static void sigint(void)
SET_FLAG(zvrf->flags, ZEBRA_VRF_RETAIN);
}
if (zebrad.lsp_process_q)
- work_queue_free(zebrad.lsp_process_q);
+ work_queue_free_and_null(&zebrad.lsp_process_q);
vrf_terminate();
ns_walk_func(zebra_ns_disabled);
@@ -151,7 +151,7 @@ static void sigint(void)
route_map_finish();
list_delete_and_null(&zebrad.client_list);
- work_queue_free(zebrad.ribq);
+ work_queue_free_and_null(&zebrad.ribq);
meta_queue_free(zebrad.mq);
frr_fini();