File tree 2 files changed +3
-0
lines changed
2 files changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
28
28
- Loosened the lower bound on the ` num-complex ` optional dependency to support
29
29
interop with ` rust-numpy ` and ` ndarray ` when building with the MSRV of 1.41
30
30
[ #1799 ] ( https://github.com/PyO3/pyo3/pull/1799 )
31
+ - Add missing ` Py_DECREF ` to ` Python::run_code ` which fixes a memory leak when
32
+ calling Python from Rust. [ #1806 ] ( https://github.com/PyO3/pyo3/pull/1806 )
31
33
32
34
## [ 0.14.2] - 2021-08-09
33
35
Original file line number Diff line number Diff line change @@ -396,6 +396,7 @@ impl<'p> Python<'p> {
396
396
return Err ( PyErr :: api_call_failed ( self ) ) ;
397
397
}
398
398
let res_ptr = ffi:: PyEval_EvalCode ( code_obj, globals, locals) ;
399
+ ffi:: Py_DECREF ( code_obj) ;
399
400
400
401
self . from_owned_ptr_or_err ( res_ptr)
401
402
}
You can’t perform that action at this time.
0 commit comments