[Asterisk-code-review] streams: Ensure that stream is closed in ast_stream_and_wait on error (asterisk[master])

Peter Fern asteriskteam at digium.com
Tue Nov 22 19:46:44 CST 2022


Attention is currently required from: N A.

Hello N A, Friendly Automation, 

I'd like you to reexamine a change. Please visit

    https://gerrit.asterisk.org/c/asterisk/+/19574

to look at the new patch set (#3).

Change subject: streams:  Ensure that stream is closed in ast_stream_and_wait on error
......................................................................

streams:  Ensure that stream is closed in ast_stream_and_wait on error

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
---
M include/asterisk/file.h
M main/file.c
2 files changed, 24 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/74/19574/3
-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/19574
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Change-Id: Ie46b67314590ad75154595a3d34d461060b2e803
Gerrit-Change-Number: 19574
Gerrit-PatchSet: 3
Gerrit-Owner: Peter Fern <asterisk at obfusc8.org>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: N A <asterisk at phreaknet.org>
Gerrit-Attention: N A <asterisk at phreaknet.org>
Gerrit-MessageType: newpatchset
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20221123/4e7359ff/attachment.html>


More information about the asterisk-code-review mailing list