From 9c74c429d900cf7381396b9db6e43ec15367ece1 Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Wed, 29 Jul 2026 12:03:27 -0400 Subject: [PATCH] MT#55283 don't evict objects still in use If a SSRC object is still in use (refcount is >1), keep it in the list, even if the list is too large. Otherwise we may end up recreating a new SSRC object for the same SSRC that still has an object in use elsewhere, making locks unreliable. Ref #2148 Change-Id: I2afd277696e05c356fc9cf5aea59f51e1fba0784 (cherry picked from commit 26fee2610a43f59e12123b53a246356dd8d0d27e) --- daemon/ssrc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/daemon/ssrc.c b/daemon/ssrc.c index 5ac45f731..176e3f8a4 100644 --- a/daemon/ssrc.c +++ b/daemon/ssrc.c @@ -227,6 +227,8 @@ void *get_ssrc_full(uint32_t ssrc, struct ssrc_hash *ht, bool *created) { while (G_UNLIKELY(ht->nq.length > MAX_SSRC_ENTRIES)) { GList *link = g_queue_pop_tail_link(&ht->nq); struct ssrc_entry *old_ent = link->data; + if (old_ent->obj.ref != 1) + break; ilog(LOG_DEBUG, "SSRC hash table exceeded size limit (trying to add %s%x%s) - " "deleting SSRC %s%x%s", FMT_M(ssrc), FMT_M(old_ent->ssrc));