You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
audiobridge: fix double free of buffered packet in participant thread
jitter_buffer_get() only assigns jbp.data when it actually returns a
packet, so a failed read leaves there the pointer to the buffered packet
that was already freed at the end of a previous iteration. The PLC branch
then passed that dangling bpkt to janus_audiobridge_buffer_packet_destroy()
whenever it saw participant->decoder == NULL, i.e. exactly when the
participant was being cleaned up concurrently: the packet got freed a
second time and the process crashed inside the allocator.
There is nothing to free in that branch, so drop the call; clear bpkt
after every destroy and reset jbp.data before each read so that a stale
pointer cannot be used again.
0 commit comments