[Asterisk-code-review] app confbridge: Fix non-reference to cfg in menu template h... (asterisk[14])

George Joseph asteriskteam at digium.com
Thu May 4 16:10:03 CDT 2017


George Joseph has uploaded a new change for review. ( https://gerrit.asterisk.org/5580 )

Change subject: app_confbridge:  Fix non-reference to cfg in menu_template_handler
......................................................................

app_confbridge:  Fix non-reference to cfg in menu_template_handler

menu_template_handler wasn't grabbing a reference to the global
cfg_handler object before trying to use it.  This would eventually
cause a crash which could be expedited by doing a module reload
on app_confbridge.

ASTERISK-26605 #close
Reported-by: Frederic LE FOLL
patches:
  ASTERISK-25506-conf_config_parser.patch by Frederic LE FOLL (5205)

Change-Id: Ib349a17d3d088f092480b19addd7122fcaac21a7
---
M apps/confbridge/conf_config_parser.c
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/80/5580/1

diff --git a/apps/confbridge/conf_config_parser.c b/apps/confbridge/conf_config_parser.c
index c272a90..763a645 100644
--- a/apps/confbridge/conf_config_parser.c
+++ b/apps/confbridge/conf_config_parser.c
@@ -2054,7 +2054,7 @@
 static int menu_template_handler(const struct aco_option *opt, struct ast_variable *var, void *obj)
 {
 	struct conf_menu *dst_menu = obj;
-	struct confbridge_cfg *cfg = aco_pending_config(&cfg_info);
+	RAII_VAR(struct confbridge_cfg *, cfg, ao2_global_obj_ref(cfg_handle), ao2_cleanup);
 	RAII_VAR(struct conf_menu *, src_menu, NULL, ao2_cleanup);
 
 	if (!cfg) {

-- 
To view, visit https://gerrit.asterisk.org/5580
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib349a17d3d088f092480b19addd7122fcaac21a7
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 14
Gerrit-Owner: George Joseph <gjoseph at digium.com>



More information about the asterisk-code-review mailing list