diff options
author | qwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-12-04 17:38:51 +0000 |
---|---|---|
committer | qwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-12-04 17:38:51 +0000 |
commit | ba0f9bf9f239ead24d3934b41f91c6afa52c3bae (patch) | |
tree | 716c7917b84a063a7b027ee296663ba6eea5f6c8 /main | |
parent | c467b626943acc5414b0c4e3a9f68470ba8c4a64 (diff) |
Merged revisions 90876 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
(closes issue #11454)
........
r90876 | qwell | 2007-12-04 11:28:08 -0600 (Tue, 04 Dec 2007) | 4 lines
If we fail to create a channel after allocating a timing fd, we need to make sure to close it.
Issue 11454, patch by eliel.
........
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@90879 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main')
-rw-r--r-- | main/channel.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/main/channel.c b/main/channel.c index a9b0d3151..bb3eb355e 100644 --- a/main/channel.c +++ b/main/channel.c @@ -673,6 +673,10 @@ struct ast_channel *ast_channel_alloc(int needqueue, int state, const char *cid_ if (needqueue) { if (pipe(tmp->alertpipe)) { ast_log(LOG_WARNING, "Channel allocation failed: Can't create alert pipe!\n"); +#ifdef HAVE_ZAPTEL + if (tmp->timingfd > -1) + close(tmp->timingfd); +#endif sched_context_destroy(tmp->sched); ast_string_field_free_memory(tmp); ast_free(tmp); |