mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-04 11:58:52 +00:00
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: https://origsvn.digium.com/svn/asterisk/branches/1.4@89577 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user