[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 07:26:07 CST 2022


Attention is currently required from: Peter Fern.

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 (#2).

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 main/file.c
1 file changed, 23 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/74/19574/2
-- 
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: 2
Gerrit-Owner: Peter Fern <asterisk at obfusc8.org>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: N A <asterisk at phreaknet.org>
Gerrit-Attention: Peter Fern <asterisk at obfusc8.org>
Gerrit-MessageType: newpatchset
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20221122/6e98982a/attachment-0001.html>


More information about the asterisk-code-review mailing list