Skip to content

Commit 5494b86

Browse files
committed
Apparently there is a function for this!
1 parent 6d8f7e9 commit 5494b86

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

php_phongo.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -964,14 +964,11 @@ mongoc_stream_t* phongo_stream_initiator(const mongoc_uri_t *uri, const mongoc_h
964964
}
965965
RETURN(NULL);
966966
}
967+
php_stream_auto_cleanup(stream);
968+
967969
mongoc_log(MONGOC_LOG_LEVEL_DEBUG, MONGOC_LOG_DOMAIN, "Created: RSRC#%d as '%s'", stream->rsrc_id, uniqid);
968970
efree(uniqid);
969971

970-
/* Avoid invalid leak warning in debug mode when freeing the stream */
971-
#if ZEND_DEBUG
972-
stream->__exposed = 1;
973-
#endif
974-
975972
if (mongoc_uri_get_ssl(uri)) {
976973
zend_error_handling error_handling;
977974

0 commit comments

Comments
 (0)