remove the route from the list. In rtable_match() check if the
route entry is NULL.
discussed with mpi@ jmatthew@ claudio@; OK mpi@
-/* $OpenBSD: rtable.c,v 1.79 2022/06/28 10:01:13 bluhm Exp $ */
+/* $OpenBSD: rtable.c,v 1.80 2022/06/29 22:20:47 bluhm Exp $ */
/*
* Copyright (c) 2014-2016 Martin Pieuchot
goto out;
rt = SRPL_FIRST(&sr, &an->an_rtlist);
+ if (rt == NULL) {
+ SRPL_LEAVE(&sr);
+ goto out;
+ }
rtref(rt);
SRPL_LEAVE(&sr);