From 80bd0d26c6057504a6db848d092c7ca373d96c79 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Fri, 3 Oct 2025 11:35:32 -0400 Subject: [PATCH] ripngd: Fix up possible NULL pointer usage The rinfo pointer in some calling functions is tested for being NULL before it is used in this function. Therefore let's make sure things are what we want them to be. Signed-off-by: Donald Sharp --- ripngd/ripngd.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ripngd/ripngd.c b/ripngd/ripngd.c index c62db9c728..70ba99fc9c 100644 --- a/ripngd/ripngd.c +++ b/ripngd/ripngd.c @@ -599,8 +599,12 @@ struct ripng_info *ripng_ecmp_replace(struct ripng *ripng, struct ripng_info *ripng_ecmp_delete(struct ripng *ripng, struct ripng_info *rinfo) { - struct agg_node *rp = rinfo->rp; - struct list *list = (struct list *)rp->info; + struct agg_node *rp; + struct list *list; + + assert(rinfo); + rp = rinfo->rp; + list = rp->info; event_cancel(&rinfo->t_timeout);