From: Ben Pfaff Date: Wed, 11 Mar 2009 20:41:36 +0000 (-0700) Subject: secchan: Don't infinite-loop in switch_status_destroy(). X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1317f711bd901205be34a85b2dc2ddac53e8da7b;p=openvswitch secchan: Don't infinite-loop in switch_status_destroy(). Duh. --- diff --git a/secchan/status.c b/secchan/status.c index 738c6dc6..2ee1a5d5 100644 --- a/secchan/status.c +++ b/secchan/status.c @@ -184,8 +184,9 @@ switch_status_destroy(struct switch_status *ss) if (ss) { /* Orphan any remaining categories, so that unregistering them later * won't write to bad memory. */ - struct status_category *c; - LIST_FOR_EACH (c, struct status_category, node, &ss->categories) { + struct status_category *c, *next; + LIST_FOR_EACH_SAFE (c, next, + struct status_category, node, &ss->categories) { list_init(&c->node); } switch_status_unregister(ss->config_cat);