MT#55283 fix refcount release

Closes #2067

Change-Id: I9fa79d67f158a3b5e00cdc83a12c494a4459f8a9
(cherry picked from commit 14769ec05d)
(cherry picked from commit 24bef62219)
mr14.1.1
Richard Fuchs 1 month ago
parent a99be15ee0
commit bf151a4471

@ -3404,10 +3404,8 @@ static void del_stream(struct re_stream *stream, struct rtpengine_table *table)
* they're closed. There can be no new open file references as the stream is set
* to eof. */
DBG("del_stream() waiting for other refs\n");
while (atomic_read(&stream->refcnt) != 2) {
if (wait_event_interruptible_timeout(stream->close_wq, atomic_read(&stream->refcnt) == 2, HZ / 10) == 0)
break;
}
while (atomic_read(&stream->refcnt) != 2)
wait_event_interruptible_timeout(stream->close_wq, atomic_read(&stream->refcnt) == 2, HZ / 10);
DBG("clearing stream's stream_idx entry\n");
_w_lock(&streams.lock, flags);

Loading…
Cancel
Save