diff --git a/lib/stream.c b/lib/stream.c index 927a3d3d55..c4edd3d5bf 100644 --- a/lib/stream.c +++ b/lib/stream.c @@ -1113,6 +1113,7 @@ void stream_fifo_push(struct stream_fifo *fifo, struct stream *s) fifo->head = s; fifo->tail = s; + fifo->tail->next = NULL; fifo->count++; } @@ -1131,6 +1132,9 @@ struct stream *stream_fifo_pop(struct stream_fifo *fifo) fifo->tail = NULL; fifo->count--; + + /* ensure stream is scrubbed of references to this fifo */ + s->next = NULL; } return s;