[asterisk-commits] mmichelson: branch 1.4 r183700 - /branches/1.4/res/res_monitor.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Mar 23 12:59:31 CDT 2009
Author: mmichelson
Date: Mon Mar 23 12:59:28 2009
New Revision: 183700
URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=183700
Log:
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:
branches/1.4/res/res_monitor.c
Modified: branches/1.4/res/res_monitor.c
URL: http://svn.digium.com/svn-view/asterisk/branches/1.4/res/res_monitor.c?view=diff&rev=183700&r1=183699&r2=183700
==============================================================================
--- branches/1.4/res/res_monitor.c (original)
+++ branches/1.4/res/res_monitor.c Mon Mar 23 12:59:28 2009
@@ -520,11 +520,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