From 672cf622726ac1117386ad98d2c5abf6cd80c8f7 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Wed, 26 May 2021 12:19:46 +0100 Subject: [PATCH] Fix memory leak when converting to u128 and i128 --- src/types/num.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/types/num.rs b/src/types/num.rs index c1828dc5..37201a49 100644 --- a/src/types/num.rs +++ b/src/types/num.rs @@ -199,6 +199,7 @@ mod fast_128bit_int_conversion { 1, $is_signed, ); + ffi::Py_DECREF(num); if ok == -1 { Err(PyErr::fetch(ob.py())) } else {