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); }