Commit 2c35fde3 by Ralf W. Grosse-Kunstleve Committed by GitHub

Fix refcount bug introduced with PR #4916. (#4927)

https://github.com/pybind/pybind11/pull/4916/files#r1387035547
parent c758b81f
...@@ -2759,7 +2759,6 @@ get_type_override(const void *this_ptr, const type_info *this_type, const char * ...@@ -2759,7 +2759,6 @@ get_type_override(const void *this_ptr, const type_info *this_type, const char *
PyObject *self_arg = PyTuple_GET_ITEM(co_varnames, 0); PyObject *self_arg = PyTuple_GET_ITEM(co_varnames, 0);
Py_DECREF(co_varnames); Py_DECREF(co_varnames);
PyObject *self_caller = dict_getitem(locals, self_arg); PyObject *self_caller = dict_getitem(locals, self_arg);
Py_DECREF(locals);
if (self_caller == self.ptr()) { if (self_caller == self.ptr()) {
Py_DECREF(f_code); Py_DECREF(f_code);
Py_DECREF(frame); Py_DECREF(frame);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment