[asterisk-commits] russell: branch 1.4 r101601 - in /branches/1.4/main: file.c translate.c

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


Author: russell
Date: Thu Jan 31 17:10:06 2008
New Revision: 101601

URL: http://svn.digium.com/view/asterisk?view=rev&rev=101601
Log:
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:
    branches/1.4/main/file.c
    branches/1.4/main/translate.c

Modified: branches/1.4/main/file.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/main/file.c?view=diff&rev=101601&r1=101600&r2=101601
==============================================================================
--- branches/1.4/main/file.c (original)
+++ branches/1.4/main/file.c Thu Jan 31 17:10:06 2008
@@ -205,6 +205,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: branches/1.4/main/translate.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/main/translate.c?view=diff&rev=101601&r1=101600&r2=101601
==============================================================================
--- branches/1.4/main/translate.c (original)
+++ branches/1.4/main/translate.c Thu Jan 31 17:10:06 2008
@@ -355,6 +355,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