Skip to content

Commit 61a47d4

Browse files
committed
NULLify after destroy and clear
1 parent 747a34b commit 61a47d4

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

php_phongo.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1286,9 +1286,11 @@ void php_phongo_result_free(php_phongo_result_t *result)
12861286
{
12871287
if (result->firstBatch) {
12881288
bson_clear(&result->firstBatch);
1289+
result->firstBatch = NULL;
12891290
}
12901291
if (result->cursor) {
12911292
mongoc_cursor_destroy(result->cursor);
1293+
result->cursor = NULL;
12921294
}
12931295
}
12941296

0 commit comments

Comments
 (0)