Skip to content
Snippets Groups Projects
  • Peter Fern's avatar
    58404b5c
    streams: Ensure that stream is closed in ast_stream_and_wait on error · 58404b5c
    Peter Fern authored
    When ast_stream_and_wait returns an error (for example, when attempting
    to stream to a channel after hangup) the stream is not closed, and
    callers typically do not check the return code. This results in leaking
    file descriptors, leading to resource exhaustion.
    
    This change ensures that the stream is closed in case of error.
    
    ASTERISK-30198 #close
    Reported-by: Julien Alie
    
    Change-Id: Ie46b67314590ad75154595a3d34d461060b2e803
    58404b5c
    History
    streams: Ensure that stream is closed in ast_stream_and_wait on error
    Peter Fern authored
    When ast_stream_and_wait returns an error (for example, when attempting
    to stream to a channel after hangup) the stream is not closed, and
    callers typically do not check the return code. This results in leaking
    file descriptors, leading to resource exhaustion.
    
    This change ensures that the stream is closed in case of error.
    
    ASTERISK-30198 #close
    Reported-by: Julien Alie
    
    Change-Id: Ie46b67314590ad75154595a3d34d461060b2e803