mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-24 14:15:11 +00:00
fix: potential memory leak in pypy (#3774)
This commit is contained in:
parent
6f01c60ad0
commit
45219c6b8f
@ -2729,9 +2729,9 @@ get_type_override(const void *this_ptr, const type_info *this_type, const char *
|
|||||||
d.ptr());
|
d.ptr());
|
||||||
if (result == nullptr)
|
if (result == nullptr)
|
||||||
throw error_already_set();
|
throw error_already_set();
|
||||||
|
Py_DECREF(result);
|
||||||
if (d["self"].is_none())
|
if (d["self"].is_none())
|
||||||
return function();
|
return function();
|
||||||
Py_DECREF(result);
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return override;
|
return override;
|
||||||
|
Loading…
Reference in New Issue
Block a user