summaryrefslogtreecommitdiff
path: root/ofproto/pinsched.c
diff options
context:
space:
mode:
Diffstat (limited to 'ofproto/pinsched.c')
-rw-r--r--ofproto/pinsched.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/ofproto/pinsched.c b/ofproto/pinsched.c
index 4b2dfd898..ee252f4f9 100644
--- a/ofproto/pinsched.c
+++ b/ofproto/pinsched.c
@@ -257,10 +257,9 @@ void
pinsched_destroy(struct pinsched *ps)
{
if (ps) {
- struct pinqueue *q, *next;
+ struct pinqueue *q;
- HMAP_FOR_EACH_SAFE (q, next, node, &ps->queues) {
- hmap_remove(&ps->queues, &q->node);
+ HMAP_FOR_EACH_POP (q, node, &ps->queues) {
ofpbuf_list_delete(&q->packets);
free(q);
}