diff options
author | qwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-11-05 17:19:41 +0000 |
---|---|---|
committer | qwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-11-05 17:19:41 +0000 |
commit | 620ba9594042c22c2e5b67ae2037c7170a5f67db (patch) | |
tree | 2e491c5a4833532053588c8f0b483f8dc7ac5013 /channels | |
parent | 0cc273612b8a1c4f95a7c67a2ea937d80e6c59d6 (diff) |
Make sure we destroy the config structure on configuration failure.
Issue 11163, patch by eliel.
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@88585 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r-- | channels/chan_sip.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 800050ddc..5fba75f36 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -16973,6 +16973,7 @@ static int reload_config(enum channelreloadreason reason) } if (ast_find_ourip(&__ourip, bindaddr)) { ast_log(LOG_WARNING, "Unable to get own IP address, SIP disabled\n"); + ast_config_destroy(cfg); return 0; } if (!ntohs(bindaddr.sin_port)) @@ -16987,6 +16988,7 @@ static int reload_config(enum channelreloadreason reason) sipsock = socket(AF_INET, SOCK_DGRAM, 0); if (sipsock < 0) { ast_log(LOG_WARNING, "Unable to create SIP socket: %s\n", strerror(errno)); + ast_config_destroy(cfg); return -1; } else { /* Allow SIP clients on the same host to access us: */ |