[asterisk-commits] mmichelson: trunk r183766 - in /trunk: ./ res/res_monitor.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Mar 23 13:58:18 CDT 2009


Author: mmichelson
Date: Mon Mar 23 13:58:03 2009
New Revision: 183766

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

........
  r183700 | mmichelson | 2009-03-23 12:59:28 -0500 (Mon, 23 Mar 2009) | 7 lines
  
  Fix a memory leak in res_monitor.c
  
  The only way that this leak would occur is if Monitor were started
  using the Manager interface and no File: header were given. Discovered
  while reviewing the ast_channel_ao2 review request.
........

Modified:
    trunk/   (props changed)
    trunk/res/res_monitor.c

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

Modified: trunk/res/res_monitor.c
URL: http://svn.digium.com/svn-view/asterisk/trunk/res/res_monitor.c?view=diff&rev=183766&r1=183765&r2=183766
==============================================================================
--- trunk/res/res_monitor.c (original)
+++ trunk/res/res_monitor.c Mon Mar 23 13:58:03 2009
@@ -587,11 +587,7 @@
 
 	if (ast_strlen_zero(fname)) {
 		/* No filename base specified, default to channel name as per CLI */		
-		if (!(fname = ast_strdup(c->name))) {
-			astman_send_error(s, m, "Could not start monitoring channel");
-			ast_channel_unlock(c);
-			return 0;
-		}
+		fname = ast_strdupa(c->name);
 		/* Channels have the format technology/channel_name - have to replace that /  */
 		if ((d = strchr(fname, '/'))) 
 			*d = '-';




More information about the asterisk-commits mailing list