From d86e41b664c33a1a50e4f089a5e7a4a4d34dcc23 Mon Sep 17 00:00:00 2001 From: Andrew Fitzgerald Date: Wed, 27 Nov 2024 10:33:51 -0600 Subject: [PATCH] Fix bytes leak on retry --- .../transaction_scheduler/prio_graph_scheduler.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/src/banking_stage/transaction_scheduler/prio_graph_scheduler.rs b/core/src/banking_stage/transaction_scheduler/prio_graph_scheduler.rs index cd83540f99454e..e523194c0d8a5a 100644 --- a/core/src/banking_stage/transaction_scheduler/prio_graph_scheduler.rs +++ b/core/src/banking_stage/transaction_scheduler/prio_graph_scheduler.rs @@ -358,6 +358,11 @@ impl PrioGraphScheduler { continue; } } + // Transaction must be dropped before removing, since we + // currently have ownership of the transaction, and + // therefore may have a reference to the backing-memory + // that the container expects to be free. + drop(transaction); container.remove_by_id(id); }