[asterisk-bugs] [JIRA] (ASTERISK-27229) bridge: Old channel video source not set to NULL after unref

Kevin Harwell (JIRA) noreply at issues.asterisk.org
Mon Apr 1 13:24:00 CDT 2019


     [ https://issues.asterisk.org/jira/browse/ASTERISK-27229?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kevin Harwell updated ASTERISK-27229:
-------------------------------------

    Target Release Version/s: 16.3.0

> bridge: Old channel video source not set to NULL after unref
> ------------------------------------------------------------
>
>                 Key: ASTERISK-27229
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-27229
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Core/Bridging
>    Affects Versions: 14.6.0
>         Environment: CentOS 7
>            Reporter: Richard Kenner
>            Assignee: Corey Farrell
>            Severity: Minor
>      Target Release: 13.20.0, 15.3.0, 16.0.0, 16.3.0
>
>
> I've had two Asterisk crashes today that seem to be caused by errors
> where chan->tech_pvt is pointing to something that can't be deallocated
> and I think I see a reference count bug in the above function.
> It contains:
> {noformat}
>                 if (data->chan_old_vsrc) {
>                         ast_channel_unref(data->chan_old_vsrc);
>                 }
> {noformat}
> Shouldn't this also have:
> {noformat}
>                         data->chan_old_vsrc = NULL;
> {noformat}
> It seems to me that if it doesn't and the next condition also isn't
> true, then the next time this same code is executed, it'll decrement
> the reference count of the old channel again, which is wrong since it
> hasn't been decremented.



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list