Module: sip-router Branch: 3.1 Commit: a10d3c62d4eb5e18e54564ed6ae354dc0ce9dfd0 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=a10d3c62...
Author: Miklos Tirpak miklos@iptel.org Committer: Miklos Tirpak miklos@iptel.org Date: Wed Oct 20 15:32:18 2010 +0200
cfg framework: segfault during exit is fixed
Verify that *cfg_global is not NULL when destroying the configuration.
t_set_fr("@cfg_get.local.invite_timeout", "@cfg_get.local.gw_timeout"); caused a segfault during startup when the variable was not defined.
Reported by Juha Heinanen (cherry picked from commit d85ff11cf0db4aad859f6dcfd18dfb2011e3d78a)
---
cfg/cfg_struct.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/cfg/cfg_struct.c b/cfg/cfg_struct.c index f2f5bfe..11a825d 100644 --- a/cfg/cfg_struct.c +++ b/cfg/cfg_struct.c @@ -333,7 +333,7 @@ void cfg_destroy(void) cfg_ctx_destroy();
/* free the list of groups */ - cfg_destory_groups(cfg_global ? (*cfg_global)->vars : NULL); + cfg_destory_groups((cfg_global && (*cfg_global)) ? (*cfg_global)->vars : NULL);
/* free the select list */ cfg_free_selects();