diff options
| author | Donald Sharp <sharpd@cumulusnetworks.com> | 2018-09-24 15:12:36 -0400 |
|---|---|---|
| committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2018-09-24 15:12:36 -0400 |
| commit | 1d48383802af98683d6d92e3d7c143b830340673 (patch) | |
| tree | 4a088a924066fcd110ef108c62d8178e63960064 /pimd/pim_instance.c | |
| parent | a1b32de24ed520a53499f6e81d6ee8eaac548bd1 (diff) | |
pimd: Fix several address sanitizer issues
This commit fixes two issues during pim shutdown.
1) The rp_info structure was being freed before the
outgoing notifications that depended on it's information
was sent out as part of shutdown.
2) The pim->upstream_list shutdown involved iterating
over the list via ALL_LIST_ELEMENTS. This typically
is enough but pim will auto delete child nodes as well
as itself when it goes away and they depend on it. As such
the node and nnode could possibly already have been freed.
So change the way we look at all the data in the upstream_list
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'pimd/pim_instance.c')
| -rw-r--r-- | pimd/pim_instance.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pimd/pim_instance.c b/pimd/pim_instance.c index bf8d05d1e1..c592a2c047 100644 --- a/pimd/pim_instance.c +++ b/pimd/pim_instance.c @@ -44,10 +44,10 @@ static void pim_instance_terminate(struct pim_instance *pim) if (pim->static_routes) list_delete_and_null(&pim->static_routes); - pim_rp_free(pim); - pim_upstream_terminate(pim); + pim_rp_free(pim); + /* Traverse and cleanup rpf_hash */ if (pim->rpf_hash) { hash_clean(pim->rpf_hash, (void *)pim_rp_list_hash_clean); |
