From 8c65c9167ee6fe75c7e7f511d12480831f98dad3 Mon Sep 17 00:00:00 2001 From: Scott Griepentrog Date: Tue, 17 Mar 2015 22:15:42 +0000 Subject: 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/ ........ Merged revisions 433064 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@433065 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- main/manager.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'main/manager.c') diff --git a/main/manager.c b/main/manager.c index aa8a5c38c..2bd9c007c 100644 --- a/main/manager.c +++ b/main/manager.c @@ -3628,7 +3628,10 @@ static enum error_type handle_updates(struct mansession *s, const struct message if (inherit) { while ((tmpl_name = ast_strsep(&inherit, ',', AST_STRSEP_STRIP))) { if ((template = ast_category_get(cfg, tmpl_name, "TEMPLATES=restrict"))) { - ast_category_inherit(category, template); + if (ast_category_inherit(category, template)) { + result = FAILURE_ALLOCATION; + break; + } } else { ast_category_destroy(category); category = NULL; -- cgit v1.2.3