diff options
author | Scott Griepentrog <sgriepentrog@digium.com> | 2015-03-17 22:15:09 +0000 |
---|---|---|
committer | Scott Griepentrog <sgriepentrog@digium.com> | 2015-03-17 22:15:09 +0000 |
commit | 2c7b9451499c5bd50bc6fa54a0073781b116834c (patch) | |
tree | 66390386d5b9e4200c83afa3448bd4d054254349 /main/codec_builtin.c | |
parent | 1fb1c81923249413e3e439a645ade8793ccc0db6 (diff) |
Various: bugfixes found via chaos
Using DEBUG_CHAOS several instances of a null
pointer crash, and one uninitialized variable
were uncovered and fixed. Also added details
on why Asterisk failed to initialize.
Review: https://reviewboard.asterisk.org/r/4468/
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@433064 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/codec_builtin.c')
-rw-r--r-- | main/codec_builtin.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/main/codec_builtin.c b/main/codec_builtin.c index 594074aa4..2e89e9a7d 100644 --- a/main/codec_builtin.c +++ b/main/codec_builtin.c @@ -776,7 +776,7 @@ static struct ast_codec t140 = { struct ast_codec *__codec_ ## __LINE__; \ res |= __ast_codec_register(&(codec), NULL); \ __codec_ ## __LINE__ = ast_codec_get((codec).name, (codec).type, (codec).sample_rate); \ - __fmt_ ## __LINE__ = ast_format_create(__codec_ ## __LINE__); \ + __fmt_ ## __LINE__ = __codec_ ## __LINE__ ? ast_format_create(__codec_ ## __LINE__) : NULL; \ res |= ast_format_cache_set(__fmt_ ## __LINE__); \ ao2_ref(__fmt_ ## __LINE__, -1); \ ao2_ref(__codec_ ## __LINE__, -1); \ |