Index: main/channel.c =================================================================== --- main/channel.c (revision 89529) +++ main/channel.c (working copy) @@ -673,6 +673,7 @@ 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); ast_free(tmp); return NULL;