diff --git a/include/pybind11/pybind11.h b/include/pybind11/pybind11.h index 15aeddbc6..0fcb588c6 100644 --- a/include/pybind11/pybind11.h +++ b/include/pybind11/pybind11.h @@ -3019,7 +3019,6 @@ get_type_override(const void *this_ptr, const type_info *this_type, const char * PyObject *self_arg = PyTuple_GET_ITEM(co_varnames, 0); Py_DECREF(co_varnames); PyObject *self_caller = dict_getitem(locals, self_arg); - Py_DECREF(locals); if (self_caller == self.ptr()) { Py_DECREF(f_code); Py_DECREF(frame);