This puts back in the changes that are designed to work
around a memory leak fix in the CLI code.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@377973
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
alias->cli_entry.command = alias->alias;
alias->cli_entry.usage = "Aliased CLI Command\n";
- ast_cli_register(&alias->cli_entry);
+ if (ast_cli_register(&alias->cli_entry)) {
+ ao2_ref(alias, -1);
+ continue;
+ }
ao2_link(cli_aliases, alias);
ast_verb(2, "Aliased CLI command '%s' to '%s'\n", v1->name, v1->value);
ao2_ref(alias, -1);