diff --git a/src/mod/formats/mod_shell_stream/mod_shell_stream.c b/src/mod/formats/mod_shell_stream/mod_shell_stream.c index d4ab1055c5..a7a762bcec 100644 --- a/src/mod/formats/mod_shell_stream/mod_shell_stream.c +++ b/src/mod/formats/mod_shell_stream/mod_shell_stream.c @@ -168,6 +168,10 @@ static switch_status_t shell_stream_file_close(switch_file_handle_t *handle) close(context->fds[0]); } + if (context->audio_buffer) { + switch_buffer_destroy(&context->audio_buffer); + } + switch_thread_rwlock_wrlock(context->rwlock); switch_thread_rwlock_unlock(context->rwlock);