diff options
author | mmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-03-23 18:59:02 +0000 |
---|---|---|
committer | mmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-03-23 18:59:02 +0000 |
commit | 028c9ed8d767bbae8c838a1c85f3e40097d982f8 (patch) | |
tree | 8d2d40bfbb0538fb40bdd0b8137c4f8f2098bec5 /res | |
parent | ebff7fb041f4a80fd9a7de35128e6e3d0e0668e4 (diff) |
Merged revisions 183766 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
................
r183766 | mmichelson | 2009-03-23 13:58:03 -0500 (Mon, 23 Mar 2009) | 13 lines
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.
........
................
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@183767 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res')
-rw-r--r-- | res/res_monitor.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/res/res_monitor.c b/res/res_monitor.c index c809b749b..6bd96fbca 100644 --- a/res/res_monitor.c +++ b/res/res_monitor.c @@ -587,11 +587,7 @@ static int start_monitor_action(struct mansession *s, const struct message *m) 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 = '-'; |