Author: sgriepentrog Date: Fri Feb 6 15:26:10 2015 New Revision: 431582 URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=431582 Log: config hooks: correct ref leaks
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 Modified: branches/11/main/config.c Modified: branches/11/main/config.c URL: http://svnview.digium.com/svn/asterisk/branches/11/main/config.c?view=diff&rev=431582&r1=431581&r2=431582 ============================================================================== --- branches/11/main/config.c (original) +++ branches/11/main/config.c Fri Feb 6 15:26:10 2015 @@ -3360,6 +3360,9 @@ 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) @@ -3448,5 +3451,6 @@ hook->module = ast_strdup(module); ao2_link(cfg_hooks, hook); + ao2_ref(hook, -1); return 0; } -- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- svn-commits mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/svn-commits