diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2017-08-02 18:10:50 +0200 |
---|---|---|
committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2017-08-02 18:14:11 +0200 |
commit | 13221cf2b4016b18b24e68d7972ed0dbfdc769bd (patch) | |
tree | 4db74fcea279e982d0766b4c8c33c66d149d45f4 /pimd/pim_upstream.c | |
parent | Merge branch 'master' into PIM_VRF (diff) | |
download | frr-13221cf2b4016b18b24e68d7972ed0dbfdc769bd.tar.xz frr-13221cf2b4016b18b24e68d7972ed0dbfdc769bd.zip |
pimd: Clean back pointer upon deletion
The channel_oil has a back pointer(up) to the upstream data structure.
If we are planning on keeping the channel oil (due to ref count issues)
longer than keeping the upstream, when we delete the upstream we were
not clearing the back pointer to up. This would result in a situation
where if that memory has started to be used again it will cause a
crash and other fun things.
Ticket: CM-17092
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'pimd/pim_upstream.c')
-rw-r--r-- | pimd/pim_upstream.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/pimd/pim_upstream.c b/pimd/pim_upstream.c index a8506501e..95d1a840f 100644 --- a/pimd/pim_upstream.c +++ b/pimd/pim_upstream.c @@ -153,6 +153,7 @@ static void upstream_channel_oil_detach(struct pim_upstream *up) /* Detaching from channel_oil, channel_oil may exist post del, but upstream would not keep reference of it */ + up->channel_oil->up = NULL; pim_channel_oil_del(up->channel_oil); up->channel_oil = NULL; } |