[asterisk-commits] russell: trunk r101611 - in /trunk: ./ main/file.c main/translate.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Jan 31 17:14:58 CST 2008


Author: russell
Date: Thu Jan 31 17:14:57 2008
New Revision: 101611

URL: http://svn.digium.com/view/asterisk?view=rev&rev=101611
Log:
Merged revisions 101601 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r101601 | russell | 2008-01-31 17:10:06 -0600 (Thu, 31 Jan 2008) | 12 lines

Fix a couple of places where ast_frfree() was not called on a frame that came
from a translator.  This showed itself by g729 decoders not getting released.
Since the flag inside the translator frame never got unset by freeing the frame
to indicate it was no longer in use, the translators never got destroyed, and
thus the g729 licenses were not released.

(closes issue #11892)
Reported by: xrg
Patches:
      11892.diff uploaded by russell (license 2)
Tested by: xrg, russell

........

Modified:
    trunk/   (props changed)
    trunk/main/file.c
    trunk/main/translate.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Modified: trunk/main/file.c
URL: http://svn.digium.com/view/asterisk/trunk/main/file.c?view=diff&rev=101611&r1=101610&r2=101611
==============================================================================
--- trunk/main/file.c (original)
+++ trunk/main/file.c Thu Jan 31 17:14:57 2008
@@ -188,6 +188,7 @@
 			trf = ast_translate(fs->trans, f, 0);
 			if (trf) {
 				res = fs->fmt->write(fs, trf);
+				ast_frfree(trf);
 				if (res) 
 					ast_log(LOG_WARNING, "Translated frame write failed\n");
 			} else

Modified: trunk/main/translate.c
URL: http://svn.digium.com/view/asterisk/trunk/main/translate.c?view=diff&rev=101611&r1=101610&r2=101611
==============================================================================
--- trunk/main/translate.c (original)
+++ trunk/main/translate.c Thu Jan 31 17:14:57 2008
@@ -347,6 +347,8 @@
 	delivery = f->delivery;
 	for ( ; out && p ; p = p->next) {
 		framein(p, out);
+		if (out != f)
+			ast_frfree(out);
 		out = p->t->frameout(p);
 	}
 	if (consume)




More information about the asterisk-commits mailing list