mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-05 20:20:07 +00:00
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
This commit is contained in:
@@ -472,7 +472,8 @@ struct ast_endpoint_snapshot *ast_endpoint_snapshot_create(
|
||||
endpoint_snapshot_dtor,
|
||||
AO2_ALLOC_OPT_LOCK_NOLOCK);
|
||||
|
||||
if (ast_string_field_init(snapshot, 80) != 0) {
|
||||
if (!snapshot || ast_string_field_init(snapshot, 80) != 0) {
|
||||
ao2_cleanup(snapshot);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user