From bbfe79fa57ec2dd067a0be176e185c0636b3f659 Mon Sep 17 00:00:00 2001 From: kngwyu Date: Wed, 26 Dec 2018 20:18:02 +0900 Subject: [PATCH] Fix memory leak in ArrayList --- src/pythonrun.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pythonrun.rs b/src/pythonrun.rs index 357641ce954..88a2c602251 100644 --- a/src/pythonrun.rs +++ b/src/pythonrun.rs @@ -298,7 +298,7 @@ mod array_list { pub fn pop_back(&mut self) -> Option { self.length -= 1; let current_idx = self.next_idx(); - if self.length >= BLOCK_SIZE && current_idx == 0 { + if current_idx == 0 { let last_list = self.inner.pop_back()?; return Some(last_list[0].clone()); }