summaryrefslogtreecommitdiffstats
path: root/bgpd/rfapi/rfapi_rib.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 /bgpd/rfapi/rfapi_rib.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 'bgpd/rfapi/rfapi_rib.c')
-rw-r--r--bgpd/rfapi/rfapi_rib.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/bgpd/rfapi/rfapi_rib.c b/bgpd/rfapi/rfapi_rib.c
index 2a8a465b7..c71f59563 100644
--- a/bgpd/rfapi/rfapi_rib.c
+++ b/bgpd/rfapi/rfapi_rib.c
@@ -571,10 +571,8 @@ void rfapiRibClear(struct rfapi_descriptor *rfd)
}
}
}
- if (rfd->updated_responses_queue) {
- work_queue_free(rfd->updated_responses_queue);
- rfd->updated_responses_queue = NULL;
- }
+ if (rfd->updated_responses_queue)
+ work_queue_free_and_null(&rfd->updated_responses_queue);
}
/*