diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2017-03-01 13:44:13 +0100 |
---|---|---|
committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2017-03-01 14:36:09 +0100 |
commit | 608a261b2c04c781e2601ad9399bb2f11eb5de19 (patch) | |
tree | 9c2303b3a4d41a9553c77f4a52fb52e52b43ed76 /pimd/pim_igmpv3.c | |
parent | Merge pull request #226 from donaldsharp/evpn_fix (diff) | |
download | frr-608a261b2c04c781e2601ad9399bb2f11eb5de19.tar.xz frr-608a261b2c04c781e2601ad9399bb2f11eb5de19.zip |
pimd: Fix use of value after free
Fix the usage of source after it has
been explicitly free'd.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to '')
-rw-r--r-- | pimd/pim_igmpv3.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/pimd/pim_igmpv3.c b/pimd/pim_igmpv3.c index fb6566513..8c7083d83 100644 --- a/pimd/pim_igmpv3.c +++ b/pimd/pim_igmpv3.c @@ -348,6 +348,7 @@ static void source_channel_oil_detach(struct igmp_source *source) void igmp_source_delete(struct igmp_source *source) { struct igmp_group *group; + struct in_addr src; group = source->source_group; @@ -388,12 +389,14 @@ void igmp_source_delete(struct igmp_source *source) */ listnode_delete(group->group_source_list, source); + src.s_addr = source->source_addr.s_addr; igmp_source_free(source); + /* Group source list is empty and current source is * then *,G group going away so do not trigger start */ if (group->group_filtermode_isexcl && (listcount (group->group_source_list) != 0) && - source->source_addr.s_addr != INADDR_ANY) + src.s_addr != INADDR_ANY) { group_exclude_fwd_anysrc_ifempty (group); } |