[svn-commits] coreyfarrell: branch 11 r427641 - /branches/11/main/manager.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Sun Nov 9 01:56:49 CST 2014


Author: coreyfarrell
Date: Sun Nov  9 01:56:41 2014
New Revision: 427641

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

Modified:
    branches/11/main/manager.c

Modified: branches/11/main/manager.c
URL: http://svnview.digium.com/svn/asterisk/branches/11/main/manager.c?view=diff&rev=427641&r1=427640&r2=427641
==============================================================================
--- branches/11/main/manager.c (original)
+++ branches/11/main/manager.c Sun Nov  9 01:56:41 2014
@@ -6674,11 +6674,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 svn-commits mailing list