aboutsummaryrefslogtreecommitdiffstats
path: root/channels
diff options
context:
space:
mode:
authormmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2008-02-18 16:37:31 +0000
committermmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2008-02-18 16:37:31 +0000
commit29a998dbf49bdf703ec8289a05f2662d3b72b098 (patch)
tree3d9a7da5f3689f0b7aa5b421ef65882e597b80b7 /channels
parent0e2f3ade2544ede7278376e48794dc05169c2197 (diff)
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
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_zap.c3
1 files changed, 3 insertions, 0 deletions
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;
}