diff options
author | qwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-12-04 17:28:08 +0000 |
---|---|---|
committer | qwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-12-04 17:28:08 +0000 |
commit | e7e92974ca0abdce3357ce6abcce136ef3588b19 (patch) | |
tree | aa44869a31db162a70e5b1d2db10d1c54d16f569 /main/channel.c | |
parent | d334149128747a6445a82a33f43ea9dac7417cdc (diff) |
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/branches/1.4@90876 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/channel.c')
-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 5d1662580..d242ea17f 100644 --- a/main/channel.c +++ b/main/channel.c @@ -776,6 +776,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); free(tmp); |