[asterisk-commits] coreyfarrell: branch 13 r427643 - in /branches/13: ./ main/manager.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sun Nov 9 02:00:22 CST 2014


Author: coreyfarrell
Date: Sun Nov  9 02:00:19 2014
New Revision: 427643

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

Merged revisions 427642 from http://svn.asterisk.org/svn/asterisk/branches/12

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

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

Modified: branches/13/main/manager.c
URL: http://svnview.digium.com/svn/asterisk/branches/13/main/manager.c?view=diff&rev=427643&r1=427642&r2=427643
==============================================================================
--- branches/13/main/manager.c (original)
+++ branches/13/main/manager.c Sun Nov  9 02:00:19 2014
@@ -7496,11 +7496,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