[svn-commits] kmoore: branch group/media_formats-reviewed-trunk r418347 - /team/group/media...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Thu Jul 10 12:34:45 CDT 2014


Author: kmoore
Date: Thu Jul 10 12:34:37 2014
New Revision: 418347

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=418347
Log:
Media Formats: Fix leak on translation path build

Ensure that inputs to ast_translator_best_choice are handled
consistently so that references held in output variables are handled
properly in all locations.

ASTERISK-23960
Review: https://reviewboard.asterisk.org/r/3737/

Modified:
    team/group/media_formats-reviewed-trunk/main/translate.c

Modified: team/group/media_formats-reviewed-trunk/main/translate.c
URL: http://svnview.digium.com/svn/asterisk/team/group/media_formats-reviewed-trunk/main/translate.c?view=diff&rev=418347&r1=418346&r2=418347
==============================================================================
--- team/group/media_formats-reviewed-trunk/main/translate.c (original)
+++ team/group/media_formats-reviewed-trunk/main/translate.c Thu Jul 10 12:34:37 2014
@@ -1302,8 +1302,8 @@
 	}
 
 	if (best) {
-		*dst_fmt_out = ao2_bump(best);
-		*src_fmt_out = ao2_bump(best);
+		ao2_replace(*dst_fmt_out, best);
+		ao2_replace(*src_fmt_out, best);
 		ao2_ref(best, -1);
 		ao2_ref(joint_cap, -1);
 		return 0;




More information about the svn-commits mailing list