summaryrefslogtreecommitdiff
path: root/main/asterisk.c
diff options
context:
space:
mode:
authorJonathan Rose <jrose@digium.com>2013-10-24 17:00:27 +0000
committerJonathan Rose <jrose@digium.com>2013-10-24 17:00:27 +0000
commit4ca0f222e85554e24d5cfb7d48b3a774d96a6e45 (patch)
tree411b1a8a88241acde89163243e464edce21486d4 /main/asterisk.c
parentbeb5cdbef54908cc1564539f9cfb8852b530f2bc (diff)
memory leaks: Memory leak cleanup patch by Corey Farrell (second set)
Also covers ast_app_parse_timelen-fail-zero-length.patch, but the patch was replaced with one of my own. (issue ASTERISK-22467) Reported by: Corey Farrell Patches: chan_dahdi-cleanup_push.patch uploaded by coreyfarrell (license 5909) clicompat-r2.patch uploaded by coreyfarrell (license 5909) codecs-ilbc-doCPLC.patch uploaded by coreyfarrell (license 5909) data-cleanup-test-registration.patch uploaded by coreyfarrell (license 5909) main-asterisk-kill-listener.patch uploaded by coreyfarrell (license 5909) ........ Merged revisions 401704 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 401705 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 401706 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@401707 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/asterisk.c')
-rw-r--r--main/asterisk.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/main/asterisk.c b/main/asterisk.c
index 95355e42f..2e5ffa729 100644
--- a/main/asterisk.c
+++ b/main/asterisk.c
@@ -1975,11 +1975,17 @@ static void really_quit(int num, shutdown_nice_t niceness, int restart)
close(ast_socket);
ast_socket = -1;
unlink(ast_config_AST_SOCKET);
+ pthread_kill(lthread, SIGURG);
+ pthread_join(lthread, NULL);
}
if (ast_consock > -1)
close(ast_consock);
if (!ast_opt_remote)
unlink(ast_config_AST_PID);
+ if (sig_alert_pipe[0])
+ close(sig_alert_pipe[0]);
+ if (sig_alert_pipe[1])
+ close(sig_alert_pipe[1]);
printf("%s", term_quit());
if (restart) {
int i;