From 4a3843e8d298299cd5527f8dbdbbc61da6b34c9d Mon Sep 17 00:00:00 2001 From: David Lamparter Date: Wed, 16 Oct 2024 13:25:37 +0200 Subject: [PATCH] pimd: MLD packets always have an interface If a packet doesn't have an interface, we're gonna crash 2 lines below. An assert is a little more useful... and makes clang-SA not complain about it. Signed-off-by: David Lamparter --- pimd/pim6_mld.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pimd/pim6_mld.c b/pimd/pim6_mld.c index a871837701..59cd9aea5f 100644 --- a/pimd/pim6_mld.c +++ b/pimd/pim6_mld.c @@ -468,6 +468,8 @@ static void gm_sg_update(struct gm_sg *sg, bool has_expired) static void gm_packet_free(struct gm_packet_state *pkt) { + assert(pkt->iface); + gm_packet_expires_del(pkt->iface->expires, pkt); gm_packets_del(pkt->subscriber->packets, pkt); gm_subscriber_drop(&pkt->subscriber);