Skip to content

PHPC-1043: phongo_execute_query() may leak cursor struct on error #698

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

derickr
Copy link
Contributor

@derickr derickr commented Dec 11, 2017

https://jira.mongodb.org/browse/PHPC-1043

I don't know how to write a test for this though, as this technically should never happen?

@derickr derickr requested a review from jmikola December 11, 2017 12:27
Copy link
Member

@jmikola jmikola left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Agreed that we can't test for this, since that would require either calling mongoc_cursor_set_hint() twice or with a zero value (see: here).

@derickr derickr force-pushed the PHPC-1043-phongo-execute-query-may-leak branch from d472ca8 to 754e8bc Compare December 12, 2017 10:17
@derickr derickr merged commit 754e8bc into mongodb:master Dec 12, 2017
derickr added a commit that referenced this pull request Dec 12, 2017
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.

2 participants