diff --git a/include/pybind11/pybind11.h b/include/pybind11/pybind11.h index 3e1a057dbf..b87fe66b27 100644 --- a/include/pybind11/pybind11.h +++ b/include/pybind11/pybind11.h @@ -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); 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);