diff options
author | Joshua Colp <jcolp@digium.com> | 2007-07-09 15:34:54 +0000 |
---|---|---|
committer | Joshua Colp <jcolp@digium.com> | 2007-07-09 15:34:54 +0000 |
commit | ec8ef98a038373ace1dc900e6686ee1e87374efc (patch) | |
tree | 730386077524cd0625a83ffb584b92bd67db4e25 /channels/chan_skinny.c | |
parent | 9632477144aa60c452603767737c3f4ecd28732d (diff) |
Merged revisions 74082 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r74082 | file | 2007-07-09 12:32:43 -0300 (Mon, 09 Jul 2007) | 2 lines
Only destroy the scheduler context if it was allocated. (issue #10124 reported by gzero)
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@74083 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/chan_skinny.c')
-rw-r--r-- | channels/chan_skinny.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/channels/chan_skinny.c b/channels/chan_skinny.c index 70226766f..6c99bb374 100644 --- a/channels/chan_skinny.c +++ b/channels/chan_skinny.c @@ -895,7 +895,7 @@ static char *skinny_cxmodes[] = { #endif /* driver scheduler */ -static struct sched_context *sched; +static struct sched_context *sched = NULL; static struct io_context *io; /* Protect the monitoring thread, so only one process can kill or start it, and not @@ -5147,7 +5147,8 @@ static int unload_module(void) ast_cli_unregister_multiple(cli_skinny, sizeof(cli_skinny) / sizeof(struct ast_cli_entry)); close(skinnysock); - sched_context_destroy(sched); + if (sched) + sched_context_destroy(sched); return 0; } |