aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2007-11-26 15:34:38 +0000
committerfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2007-11-26 15:34:38 +0000
commit58bf4b3b3a8653ac53946d8551fa3d0871f1cbbd (patch)
tree82f979103c709ebf484767364d4513ba6acf8d07
parent2b26cd01acf88ee620ba45cc3df43040ba1124a6 (diff)
If channel allocation fails because the alert pipe could not be created also free the scheduler context.
(closes issue #11355) Reported by: eliel Patches: main.channel.c.patch uploaded by eliel (license 64) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@89577 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--main/channel.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/main/channel.c b/main/channel.c
index c9de79bc0..ce9f2ce74 100644
--- a/main/channel.c
+++ b/main/channel.c
@@ -776,6 +776,7 @@ 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");
+ sched_context_destroy(tmp->sched);
ast_string_field_free_memory(tmp);
free(tmp);
return NULL;