summaryrefslogtreecommitdiff
path: root/channels
diff options
context:
space:
mode:
authorAnthony Minessale II <anthmct@yahoo.com>2004-05-29 03:40:35 +0000
committerAnthony Minessale II <anthmct@yahoo.com>2004-05-29 03:40:35 +0000
commitf30d55fbf66964de749856effb235acedf60c27a (patch)
tree01f32fb83377b4c6e04525398e401e794757dfea /channels
parent8136198e532f7750e0700ffdf6fa1834cb9d6734 (diff)
saw this in valgrind (-tony)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3107 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels')
-rwxr-xr-xchannels/chan_skinny.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/channels/chan_skinny.c b/channels/chan_skinny.c
index 093b08338..bd86147f1 100755
--- a/channels/chan_skinny.c
+++ b/channels/chan_skinny.c
@@ -2539,6 +2539,7 @@ static int reload_config(void)
hp = ast_gethostbyname(ourhost, &ahp);
if (!hp) {
ast_log(LOG_WARNING, "Unable to get our IP address, Skinny disabled\n");
+ ast_destroy(cfg);
return 0;
}
memcpy(&__ourip, hp->h_addr, sizeof(__ourip));
@@ -2574,6 +2575,7 @@ static int reload_config(void)
skinnysock = socket(AF_INET, SOCK_STREAM, 0);
if(setsockopt(skinnysock, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on)) == -1) {
ast_log(LOG_ERROR, "Set Socket Options failed: errno %d, %s", errno, strerror(errno));
+ ast_destroy(cfg);
return 0;
}
@@ -2586,6 +2588,7 @@ static int reload_config(void)
strerror(errno));
close(skinnysock);
skinnysock = -1;
+ ast_destroy(cfg);
return 0;
}
@@ -2595,6 +2598,7 @@ static int reload_config(void)
strerror(errno));
close(skinnysock);
skinnysock = -1;
+ ast_destroy(cfg);
return 0;
}