summaryrefslogtreecommitdiff
path: root/main/manager.c
diff options
context:
space:
mode:
authorCorey Farrell <git@cfware.com>2014-11-09 08:00:19 +0000
committerCorey Farrell <git@cfware.com>2014-11-09 08:00:19 +0000
commit8ab323feadf462b8c4fa004ca2eb755bad008ddd (patch)
tree3ee5de6efcc4c264416c92f82d5e36da123fd0f6 /main/manager.c
parent468ccd1b66e24203a083b591ae7288ddd4ffb7a3 (diff)
manager: Fix HTTP connection reference leaks.
Fix reference leak that happens if (session && !blastaway). ASTERISK-24505 #close Reported by: Corey Farrell Review: https://reviewboard.asterisk.org/r/4153/ ........ Merged revisions 427641 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 427642 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@427643 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/manager.c')
-rw-r--r--main/manager.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/main/manager.c b/main/manager.c
index 1c5d12395..0c5d76a19 100644
--- a/main/manager.c
+++ b/main/manager.c
@@ -7496,11 +7496,16 @@ generic_callback_out:
ast_free(http_header);
ast_free(out);
- if (session && blastaway) {
- session_destroy(session);
- } else if (session && session->f) {
- fclose(session->f);
- session->f = NULL;
+ if (session) {
+ if (blastaway) {
+ session_destroy(session);
+ } else {
+ if (session->f) {
+ fclose(session->f);
+ session->f = NULL;
+ }
+ unref_mansession(session);
+ }
}
return 0;