This is an archive of the discontinued LLVM Phabricator instance.

Fix ref-leak in LLDBSwigPythonCallPythonLogOutputCallback
ClosedPublic

Authored by luyer on May 31 2017, 2:00 PM.

Details

Summary

Fix ref-leak in LLDBSwigPythonCallPythonLogOutputCallback: as with almost all functions returning PyObject*, the caller receives a new reference and must DECREF it if they want to ignore it. In this case, errors are silently ignored in the current code, so use XDECREF (null-safe).

Diff Detail

Event Timeline

luyer created this revision.May 31 2017, 2:00 PM
luyer added a reviewer: zturner.
zturner accepted this revision.May 31 2017, 2:05 PM
zturner added a subscriber: llvm-commits.

lgtm, thanks! In the future please add llvm-commits to the subscribers list. Do you have commit access?

This revision is now accepted and ready to land.May 31 2017, 2:05 PM
luyer added a comment.May 31 2017, 3:35 PM

No, I don't believe I have commit access.

This revision was automatically updated to reflect the committed changes.