Commit af08a95b by Aaron Gokaslan Committed by GitHub

fix: potential memory leak in pypy (#3774)

parent 42a8e312
...@@ -2694,9 +2694,9 @@ get_type_override(const void *this_ptr, const type_info *this_type, const char * ...@@ -2694,9 +2694,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;
......
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