[Asterisk-code-review] app_read: Release tone zone reference on early return. (asterisk[16])
George Joseph
asteriskteam at digium.com
Thu Feb 4 09:57:04 CST 2021
George Joseph has submitted this change. ( https://gerrit.asterisk.org/c/asterisk/+/15393 )
Change subject: app_read: Release tone zone reference on early return.
......................................................................
app_read: Release tone zone reference on early return.
Change-Id: I350939f2220f9e5d44ddf4c8d9a4c99fde4d169a
---
M apps/app_read.c
1 file changed, 3 insertions(+), 0 deletions(-)
Approvals:
Kevin Harwell: Looks good to me, but someone else must approve
George Joseph: Looks good to me, approved; Approved for Submit
diff --git a/apps/app_read.c b/apps/app_read.c
index f919357..6398281 100644
--- a/apps/app_read.c
+++ b/apps/app_read.c
@@ -195,6 +195,9 @@
if (ast_channel_state(chan) != AST_STATE_UP) {
if (ast_test_flag(&flags, OPT_SKIP)) {
/* At the user's option, skip if the line is not up */
+ if (ts) {
+ ts = ast_tone_zone_sound_unref(ts);
+ }
pbx_builtin_setvar_helper(chan, arglist.variable, "");
pbx_builtin_setvar_helper(chan, "READSTATUS", "SKIPPED");
return 0;
--
To view, visit https://gerrit.asterisk.org/c/asterisk/+/15393
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 16
Gerrit-Change-Id: I350939f2220f9e5d44ddf4c8d9a4c99fde4d169a
Gerrit-Change-Number: 15393
Gerrit-PatchSet: 3
Gerrit-Owner: Sean Bright <sean.bright at gmail.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20210204/ab4d5081/attachment.html>
More information about the asterisk-code-review
mailing list