From 29a998dbf49bdf703ec8289a05f2662d3b72b098 Mon Sep 17 00:00:00 2001 From: mmichelson Date: Mon, 18 Feb 2008 16:37:31 +0000 Subject: Fix a linked list corruption that under the right circumstances could lead to a looped list, meaning it will traverse forever. (closes issue #11818) Reported by: michael-fig Patches: 11818.patch uploaded by putnopvut (license 60) Tested by: michael-fig git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@103770 f38db490-d61c-443f-a65b-d21fe96a405b --- channels/chan_zap.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'channels') diff --git a/channels/chan_zap.c b/channels/chan_zap.c index 5b755ea07..e8d9fb2aa 100644 --- a/channels/chan_zap.c +++ b/channels/chan_zap.c @@ -7706,7 +7706,10 @@ static struct zt_pvt *chandup(struct zt_pvt *src) } p->destroy = 1; p->next = iflist; + p->prev = NULL; iflist = p; + if (iflist->next) + iflist->next->prev = p; return p; } -- cgit v1.2.3