Permalink
Browse files

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

  • Loading branch information...
derickr committed Dec 11, 2017
1 parent e0aa3a2 commit 754e8bc1bdbcd6017c7c5936ff37294a959f81c2
Showing with 1 addition and 0 deletions.
  1. +1 −0 php_phongo.c
View
@@ -767,6 +767,7 @@ int phongo_execute_query(mongoc_client_t *client, const char *namespace, zval *z
if (server_id > 0 && !mongoc_cursor_set_hint(cursor, server_id)) {
phongo_throw_exception(PHONGO_ERROR_MONGOC_FAILED TSRMLS_CC, "%s", "Could not set cursor server_id");
mongoc_cursor_destroy(cursor);
return false;
}

0 comments on commit 754e8bc

Please sign in to comment.