Module: sip-router
Branch: master
Commit: d85ff11cf0db4aad859f6dcfd18dfb2011e3d78a
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=d85ff11…
Author: Miklos Tirpak <miklos(a)iptel.org>
Committer: Miklos Tirpak <miklos(a)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("(a)cfg_get.local.invite_timeout"eout",
"(a)cfg_get.local.gw_timeout")out");
caused a segfault during startup when the variable was not defined.
Reported by Juha Heinanen
---
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();