This small patch fixes a ref leak when
adding a config hook and cleans up the
container on shutdown.
Review: https://reviewboard.asterisk.org/r/4407
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@431582
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
AST_LIST_UNLOCK(&cfmtime_head);
ast_cli_unregister_multiple(cli_config, ARRAY_LEN(cli_config));
+
+ ao2_cleanup(cfg_hooks);
+ cfg_hooks = NULL;
}
int register_config_cli(void)
hook->module = ast_strdup(module);
ao2_link(cfg_hooks, hook);
+ ao2_ref(hook, -1);
return 0;
}