From 4ca0f222e85554e24d5cfb7d48b3a774d96a6e45 Mon Sep 17 00:00:00 2001 From: Jonathan Rose Date: Thu, 24 Oct 2013 17:00:27 +0000 Subject: 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 --- main/asterisk.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'main/asterisk.c') 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; -- cgit v1.2.3