raulcd opened a new pull request, #50594:
URL: https://github.com/apache/arrow/pull/50594

   ### Rationale for this change
   
   We currently leak the list and items in the case of an iterator raising an 
Exception and size is present.
   
   ### What changes are included in this PR?
   
   Use `OwnedRef` instead of relying on manual `Py_DECREF` in order to avoid 
exception scenario returning early in `RETURN_IF_PYERROR`. 
   
   ### Are these changes tested?
   
   Yes, I've created a new test that fails previously to the fix and passes 
after the fix
   
   ### Are there any user-facing changes?
   
   No
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to