Skip to content

Fix reference leak in query cursor progress callback - #489

Merged
ObserverOfTime merged 1 commit into
tree-sitter:masterfrom
A-S-Manoj:fix/484-query-cursor-progress-callback-refleak
Aug 2, 2026
Merged

Fix reference leak in query cursor progress callback#489
ObserverOfTime merged 1 commit into
tree-sitter:masterfrom
A-S-Manoj:fix/484-query-cursor-progress-callback-refleak

Conversation

@A-S-Manoj

Copy link
Copy Markdown
Contributor

query_cursor_progress_callback() leaked the Python callback's return value since PyObject_IsTrue() reads the object but does not consume the reference. The result is now decref'd after computing the truth value.

Fixes #484

query_cursor_progress_callback() leaked the Python callback's return value since PyObject_IsTrue() reads the object but does not consume the reference. The result is now decref'd after computing the truth value.  Fixes tree-sitter#484
@ObserverOfTime
ObserverOfTime merged commit c596e9e into tree-sitter:master Aug 2, 2026
29 checks passed
@ObserverOfTime

Copy link
Copy Markdown
Member

Thank you for the contributions.

@A-S-Manoj

Copy link
Copy Markdown
Contributor Author

Thank you for reviewing and merging the fix. I appreciate your time and look forward to contributing again.

@A-S-Manoj
A-S-Manoj deleted the fix/484-query-cursor-progress-callback-refleak branch August 2, 2026 16:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reference leak in query cursor progress callback

2 participants