From a5a0adb2c54cde99f818314b414a4bcab6f49825 Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Tue, 17 Sep 2019 18:31:52 -0700 Subject: [PATCH] ircd::m::event::refs: Fix use of tls buffer in this context. --- ircd/m_event.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ircd/m_event.cc b/ircd/m_event.cc index 0fe6319e7..3fc7189ea 100644 --- a/ircd/m_event.cc +++ b/ircd/m_event.cc @@ -1956,8 +1956,6 @@ ircd::m::event::refs::for_each(const dbs::ref &type, const closure_bool &closure) const { - thread_local char buf[dbs::EVENT_REFS_KEY_MAX_SIZE]; - if(!idx) return true; @@ -1967,6 +1965,8 @@ const const bool all_type(type == dbs::ref(uint8_t(-1))); const auto &_type{all_type? dbs::ref::NEXT : type}; assert(uint8_t(dbs::ref::NEXT) == 0); + + char buf[dbs::EVENT_REFS_KEY_MAX_SIZE]; const string_view key { dbs::event_refs_key(buf, idx, _type, 0)