Skip to content
Snippets Groups Projects
Commit a60a9b66 authored by Tilghman Lesher's avatar Tilghman Lesher
Browse files

Only unlock these if they were locked on entry

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38250 65c4cc65-6c06-0410-ace0-fbb531ad65f3
parent 6d52c0b5
No related branches found
No related tags found
No related merge requests found
......@@ -200,7 +200,7 @@ int ast_monitor_start( struct ast_channel *chan, const char *format_spec,
ast_log(LOG_WARNING, "Could not create file %s\n",
monitor->read_filename);
free(monitor);
ast_channel_unlock(chan);
UNLOCK_IF_NEEDED(chan, need_lock);
return -1;
}
if (ast_fileexists(monitor->write_filename, NULL, NULL) > 0) {
......@@ -213,7 +213,7 @@ int ast_monitor_start( struct ast_channel *chan, const char *format_spec,
monitor->write_filename);
ast_closestream(monitor->read_stream);
free(monitor);
ast_channel_unlock(chan);
UNLOCK_IF_NEEDED(chan, need_lock);
return -1;
}
chan->monitor = monitor;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment