From cb412caabc3df92988024b7afc9bc0f50a0fb691 Mon Sep 17 00:00:00 2001 From: Burton Qin Date: Sat, 18 Jun 2022 10:59:18 +0800 Subject: [PATCH] runtime: fix possible deadlock in in_mem_accounts_index --- runtime/src/in_mem_accounts_index.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/runtime/src/in_mem_accounts_index.rs b/runtime/src/in_mem_accounts_index.rs index bb4e8439c69d16..3cb7cddcddf083 100644 --- a/runtime/src/in_mem_accounts_index.rs +++ b/runtime/src/in_mem_accounts_index.rs @@ -147,6 +147,7 @@ impl InMemAccountsIndex { result.push((*k, Arc::clone(v))); } }); + drop(map); self.hold_range_in_memory(range, false); Self::update_stat(&self.stats().items, 1); Self::update_time_stat(&self.stats().items_us, m);