[svn-commits] dvossel: branch 1.6.2 r269272 - in /branches/1.6.2: ./ res/res_musiconhold.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed Jun 9 10:13:59 CDT 2010


Author: dvossel
Date: Wed Jun  9 10:13:55 2010
New Revision: 269272

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=269272
Log:
Merged revisions 269271 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

........
  r269271 | dvossel | 2010-06-09 10:09:25 -0500 (Wed, 09 Jun 2010) | 15 lines
  
  fixes crash in moh when cachertclasses flag is used
  
  The result for moh_register was not verified to guarantee
  the mohclass as added to the container.
  
  
  (closes issue #16993)
  Reported by: dmitri
  Patches:
        res_musiconhold_rtclass2.patch uploaded by dmitri (license 1001)
        moh_crash2.diff uploaded by dvossel (license 671)
  Tested by: dmitri
........

Modified:
    branches/1.6.2/   (props changed)
    branches/1.6.2/res/res_musiconhold.c

Propchange: branches/1.6.2/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.

Modified: branches/1.6.2/res/res_musiconhold.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.6.2/res/res_musiconhold.c?view=diff&rev=269272&r1=269271&r2=269272
==============================================================================
--- branches/1.6.2/res/res_musiconhold.c (original)
+++ branches/1.6.2/res/res_musiconhold.c Wed Jun  9 10:13:55 2010
@@ -1347,7 +1347,10 @@
 				 * has a pointer to a freed mohclass, so any operations involving the mohclass container would result in reading
 				 * invalid memory.
 				 */
-				moh_register(mohclass, 0, DONT_UNREF);
+				if (moh_register(mohclass, 0, DONT_UNREF) == -1) {
+					mohclass = mohclass_unref(mohclass, "unreffing mohclass failed to register");
+					return -1;
+				}
 			} else {
 				/* We don't register RT moh class, so let's init it manualy */
 




More information about the svn-commits mailing list