Skip to content

Commit b0a4735

Browse files
committed
Merged pull request #698
2 parents e0aa3a2 + 754e8bc commit b0a4735

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

php_phongo.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -767,6 +767,7 @@ int phongo_execute_query(mongoc_client_t *client, const char *namespace, zval *z
767767

768768
if (server_id > 0 && !mongoc_cursor_set_hint(cursor, server_id)) {
769769
phongo_throw_exception(PHONGO_ERROR_MONGOC_FAILED TSRMLS_CC, "%s", "Could not set cursor server_id");
770+
mongoc_cursor_destroy(cursor);
770771
return false;
771772
}
772773

0 commit comments

Comments
 (0)