diff options
author | Kinsey Moore <kmoore@digium.com> | 2013-06-14 18:46:00 +0000 |
---|---|---|
committer | Kinsey Moore <kmoore@digium.com> | 2013-06-14 18:46:00 +0000 |
commit | 9a43a7e575882c5ab495da9b53c6cadb8723bc1f (patch) | |
tree | a991640f3a3ec9bc3bb5ebd27a2cba91e09970b6 /main/cel.c | |
parent | bfdff342b416618409fc9e3d20b96a15171d957d (diff) |
Fix two more possible crashes in CEL
These are locations that should return valid snapshots, but need to be
handled if not.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@391855 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/cel.c')
-rw-r--r-- | main/cel.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/main/cel.c b/main/cel.c index c186f4c9e..ff74ed1ef 100644 --- a/main/cel.c +++ b/main/cel.c @@ -1283,6 +1283,10 @@ static void cel_snapshot_update_cb(void *data, struct stasis_subscription *sub, /* create a bridge_assoc for this bridge and mark it as being tracked appropriately */ chan_snapshot = ast_channel_snapshot_get_latest(channel_id); + if (!chan_snapshot) { + return; + } + ast_assert(chan_snapshot != NULL); assoc = bridge_assoc_alloc(chan_snapshot, new_snapshot->uniqueid, chan_snapshot->name); if (!assoc) { @@ -1329,6 +1333,10 @@ static void cel_bridge_enter_cb( ao2_iterator_destroy(&i); latest_primary = ast_channel_snapshot_get_latest(channel_id); + if (!latest_primary) { + return; + } + add_bridge_primary(latest_primary, snapshot->uniqueid, chan_snapshot->name); report_event_snapshot(latest_primary, AST_CEL_BRIDGE_START, NULL, NULL, chan_snapshot->name); } |