From: Jeffrey Hsu Date: Tue, 3 Aug 2004 01:59:58 +0000 (+0000) Subject: Fix bug with tracking the previous element in a list. X-Git-Tag: v2.0.1~10574 X-Git-Url: https://gitweb.dragonflybsd.org/dragonfly.git/commitdiff_plain/4dbda9866d13470b047ff40e4c274d453c144a30 Fix bug with tracking the previous element in a list. Found by: edrt@citiz.net Submitted by: pavlin@icir.org --- diff --git a/sys/net/ip_mroute/ip_mroute.c b/sys/net/ip_mroute/ip_mroute.c index 7bd63a41cb..7f156b2530 100644 --- a/sys/net/ip_mroute/ip_mroute.c +++ b/sys/net/ip_mroute/ip_mroute.c @@ -18,7 +18,7 @@ * bandwidth metering and signaling * * $FreeBSD: src/sys/netinet/ip_mroute.c,v 1.56.2.10 2003/08/24 21:37:34 hsu Exp $ - * $DragonFly: src/sys/net/ip_mroute/ip_mroute.c,v 1.13 2004/06/04 07:45:46 hmp Exp $ + * $DragonFly: src/sys/net/ip_mroute/ip_mroute.c,v 1.14 2004/08/03 01:59:58 hsu Exp $ */ #include "opt_mrouting.h" @@ -2340,7 +2340,7 @@ del_bw_upcall(struct bw_upcall *req) /* Find the bw_meter entry to delete */ for (prev = NULL, x = mfc->mfc_bw_meter; x != NULL; - x = x->bm_mfc_next) { + prev = x, x = x->bm_mfc_next) { if ((BW_TIMEVALCMP(&x->bm_threshold.b_time, &req->bu_threshold.b_time, ==)) && (x->bm_threshold.b_packets == req->bu_threshold.b_packets) &&