File tree Expand file tree Collapse file tree 1 file changed +5
-11
lines changed Expand file tree Collapse file tree 1 file changed +5
-11
lines changed Original file line number Diff line number Diff line change @@ -58,16 +58,6 @@ static void php_phongo_cursor_free_current(php_phongo_cursor_t *cursor) /* {{{ *
58
58
}
59
59
} /* }}} */
60
60
61
- void php_phongo_cursor_free (php_phongo_cursor_t * cursor ) /* {{{ */
62
- {
63
- if (cursor -> cursor ) {
64
- mongoc_cursor_destroy (cursor -> cursor );
65
- cursor -> cursor = NULL ;
66
- }
67
-
68
- php_phongo_cursor_free_current (cursor );
69
- } /* }}} */
70
-
71
61
/* {{{ Iterator handlers */
72
62
static void php_phongo_cursor_iterator_dtor (zend_object_iterator * iter TSRMLS_DC ) /* {{{ */
73
63
{
@@ -386,6 +376,10 @@ static void php_phongo_cursor_free_object(phongo_free_object_arg *object TSRMLS_
386
376
387
377
zend_object_std_dtor (& intern -> std TSRMLS_CC );
388
378
379
+ if (intern -> cursor ) {
380
+ mongoc_cursor_destroy (intern -> cursor );
381
+ }
382
+
389
383
if (intern -> database ) {
390
384
efree (intern -> database );
391
385
}
@@ -406,7 +400,7 @@ static void php_phongo_cursor_free_object(phongo_free_object_arg *object TSRMLS_
406
400
zval_ptr_dtor (& intern -> read_preference );
407
401
}
408
402
409
- php_phongo_cursor_free (intern );
403
+ php_phongo_cursor_free_current (intern );
410
404
411
405
zval_ptr_dtor (& intern -> manager );
412
406
You can’t perform that action at this time.
0 commit comments