[svn-commits] kharwell: branch certified-13.1 r432365 - in /certified/branches/13.1: ./ app...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Thu Feb 26 11:15:06 CST 2015


Author: kharwell
Date: Thu Feb 26 11:15:04 2015
New Revision: 432365

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=432365
Log:
app_chanspy, channel: fix frame leaks

Fixed a couple of frame leaks that were found during testing.

ASTERISK-24828 #close
Reported by: John Hardin
Review: https://reviewboard.asterisk.org/r/4445/
........

Merged revisions 432362 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 432363 from http://svn.asterisk.org/svn/asterisk/branches/13

Modified:
    certified/branches/13.1/   (props changed)
    certified/branches/13.1/apps/app_chanspy.c
    certified/branches/13.1/main/channel.c

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

Modified: certified/branches/13.1/apps/app_chanspy.c
URL: http://svnview.digium.com/svn/asterisk/certified/branches/13.1/apps/app_chanspy.c?view=diff&rev=432365&r1=432364&r2=432365
==============================================================================
--- certified/branches/13.1/apps/app_chanspy.c (original)
+++ certified/branches/13.1/apps/app_chanspy.c Thu Feb 26 11:15:04 2015
@@ -698,6 +698,9 @@
 	while (ast_waitfor(chan, -1) > -1 && csth.spy_audiohook.status == AST_AUDIOHOOK_STATUS_RUNNING) {
 		if (!(f = ast_read(chan)) || ast_check_hangup(chan)) {
 			running = -1;
+			if (f) {
+				ast_frfree(f);
+			}
 			break;
 		}
 

Modified: certified/branches/13.1/main/channel.c
URL: http://svnview.digium.com/svn/asterisk/certified/branches/13.1/main/channel.c?view=diff&rev=432365&r1=432364&r2=432365
==============================================================================
--- certified/branches/13.1/main/channel.c (original)
+++ certified/branches/13.1/main/channel.c Thu Feb 26 11:15:04 2015
@@ -2824,14 +2824,14 @@
 				}
 			}
 
-			if (res == 0) {
-				ast_channel_lock(chan);
-				while ((cur = AST_LIST_REMOVE_HEAD(&frames, frame_list))) {
+			ast_channel_lock(chan);
+			while ((cur = AST_LIST_REMOVE_HEAD(&frames, frame_list))) {
+				if (res == 0) {
 					ast_queue_frame_head(chan, cur);
-					ast_frfree(cur);
 				}
-				ast_channel_unlock(chan);
-			}
+				ast_frfree(cur);
+			}
+			ast_channel_unlock(chan);
 		} while (0);
 		break;
 	default:




More information about the svn-commits mailing list