summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ofproto/pinsched.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/ofproto/pinsched.c b/ofproto/pinsched.c
index 51f176050..500115ad2 100644
--- a/ofproto/pinsched.c
+++ b/ofproto/pinsched.c
@@ -94,6 +94,12 @@ adjust_limits(int *rate_limit, int *burst_limit)
static void
pinqueue_destroy(struct pinsched *ps, struct pinqueue *q)
{
+ if (ps->next_txq == q) {
+ advance_txq(ps);
+ if (ps->next_txq == q) {
+ ps->next_txq = NULL;
+ }
+ }
hmap_remove(&ps->queues, &q->node);
free(q);
}