Skip to content

Conversation

bjori
Copy link
Contributor

@bjori bjori commented Apr 14, 2015

No description provided.

php_phongo.c Outdated
Copy link
Member

Choose a reason for hiding this comment

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

Since this only frees cursor->visitor_data.zchild if it's not null, was there a specific reason to move it up? I've no objection if it was just for style points, but I'm curious if there was another reason.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

cursor_it->cursor is the php_phongo_cursor_t* of the cursor_it->intern.data zval*.

If you destroy the zval first, the php_phongo_cursor_t* will be invalid.

@bjori bjori force-pushed the PHPc-239 branch 2 times, most recently from 514366f to 11a57b4 Compare April 14, 2015 17:57
Copy link
Member

Choose a reason for hiding this comment

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

This should be PHPC and omit the leading zero.

@jmikola
Copy link
Member

jmikola commented Apr 14, 2015

LGTM.

This also fixes re-iterating over a cursor where we would not free the
firstBatch properly, so the last result was still there.
bjori added a commit that referenced this pull request Apr 14, 2015
@bjori bjori merged commit 4da1efd into mongodb:master Apr 14, 2015
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