[asterisk-users] Bug in main/bridge.c:ast_bridge_update_talker_src_video_mode

Richard Kenner kenner at gnat.com
Mon Aug 28 18:35:52 CDT 2017


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:

                if (data->chan_old_vsrc) {
                        ast_channel_unref(data->chan_old_vsrc);
                }

Shouldn't this also have:

			data->chan_old_vsrc = NULL;

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.

What am I missing?



More information about the asterisk-users mailing list