Skip to content

Commit 38f7d67

Browse files
committed
PHPC-609: Free mongoc_uri_t if RC/RP/WC application fails
This resolves a memory leak introduced in 12ec628.
1 parent 912a6e2 commit 38f7d67

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
@@ -1989,6 +1989,7 @@ bool phongo_manager_init(php_phongo_manager_t *manager, const char *uri_string,
19891989
!php_phongo_apply_rp_options_to_uri(uri, bson_options TSRMLS_CC) ||
19901990
!php_phongo_apply_wc_options_to_uri(uri, bson_options TSRMLS_CC)) {
19911991
/* Exception should already have been thrown */
1992+
mongoc_uri_destroy(uri);
19921993
return false;
19931994
}
19941995

0 commit comments

Comments
 (0)