diff options
author | automerge <automerge@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-02-25 15:21:12 +0000 |
---|---|---|
committer | automerge <automerge@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-02-25 15:21:12 +0000 |
commit | f10bd739bc65075aff225cc82dec01d23744b8cb (patch) | |
tree | d4b82e1c537e162ef27ab93b90bb515f96b68340 /channel.c | |
parent | f725832380ac880a58cecd806084e216aba5bcda (diff) |
automerge commit
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2-netsec@56728 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channel.c')
-rw-r--r-- | channel.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -747,7 +747,11 @@ static struct ast_channel *channel_find_locked(const struct ast_channel *prev, if (c != prev) /* not this one */ continue; /* found, prepare to return c->next */ - c = c->next; + if ((c = c->next) == NULL) break; + /* If prev was the last item on the channel list, then we just + * want to return NULL, instead of trying to deref NULL in the + * next section. + */ } if (name) { /* want match by name */ if ((!namelen && strcasecmp(c->name, name)) || |