[asterisk-commits] coreyfarrell: branch 12 r427642 - in /branches/12: ./ main/manager.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sun Nov 9 01:58:40 CST 2014


Author: coreyfarrell
Date: Sun Nov  9 01:58:36 2014
New Revision: 427642

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=427642
Log:
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

Modified:
    branches/12/   (props changed)
    branches/12/main/manager.c

Propchange: branches/12/
------------------------------------------------------------------------------
Binary property 'branch-11-merged' - no diff available.

Modified: branches/12/main/manager.c
URL: http://svnview.digium.com/svn/asterisk/branches/12/main/manager.c?view=diff&rev=427642&r1=427641&r2=427642
==============================================================================
--- branches/12/main/manager.c (original)
+++ branches/12/main/manager.c Sun Nov  9 01:58:36 2014
@@ -7314,11 +7314,16 @@
 	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;




More information about the asterisk-commits mailing list