aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--res/res_monitor.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/res/res_monitor.c b/res/res_monitor.c
index 4baa1580d..69db65cd2 100644
--- a/res/res_monitor.c
+++ b/res/res_monitor.c
@@ -520,11 +520,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 = '-';