From 9cd9d3d3bb118f2160670c9d8525b6f5f79f5581 Mon Sep 17 00:00:00 2001 From: Adam Sutton Date: Sun, 9 Jun 2013 12:01:36 +0100 Subject: [PATCH] streaming: assert to catch errnoneous linkage --- src/streaming.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/streaming.c b/src/streaming.c index 57c472e9..1565b8a0 100644 --- a/src/streaming.c +++ b/src/streaming.c @@ -17,6 +17,7 @@ */ #include +#include #include "tvheadend.h" #include "streaming.h" @@ -328,8 +329,8 @@ streaming_pad_deliver(streaming_pad_t *sp, streaming_message_t *sm) streaming_target_t *st, *next; for(st = LIST_FIRST(&sp->sp_targets);st; st = next) { - next = LIST_NEXT(st, st_link); + assert(next != st); if(st->st_reject_filter & SMT_TO_MASK(sm->sm_type)) continue; st->st_cb(st->st_opaque, streaming_msg_clone(sm));