From bd7f3422bbe38ba87888b765e94b56bfcbb9602c Mon Sep 17 00:00:00 2001 From: Benoît Ganne Date: Thu, 16 Apr 2020 12:47:47 +0200 Subject: igmp: fix igmp proxy group merge MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When merging proxy groups in igmp_proxy_device_merge_group(), the call to igmp_proxy_device_merge_src() can end up removing the current proxy group via igmp_group_clear(). When that happens, it must returns NULL so that igmp_proxy_device_merge_config() does not send a IGMPv3 report for a dead proxy group. Make igmp_group_clear() reset the group pointer to NULL to fix this bug and to detect similar bugs more easily. Type: fix Change-Id: I229e55b5bfa71734d7844893f5209a66fa3cc8ae Signed-off-by: Benoît Ganne --- src/plugins/igmp/igmp_src.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/plugins/igmp/igmp_src.c') diff --git a/src/plugins/igmp/igmp_src.c b/src/plugins/igmp/igmp_src.c index 64768ab59bd..bec46f86399 100644 --- a/src/plugins/igmp/igmp_src.c +++ b/src/plugins/igmp/igmp_src.c @@ -66,7 +66,7 @@ igmp_src_exp (u32 obj, void *dat) igmp_src_free (src); if (0 == igmp_group_n_srcs (group, IGMP_FILTER_MODE_INCLUDE)) - igmp_group_clear (group); + igmp_group_clear (&group); } igmp_src_t * -- cgit 1.2.3-korg