File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -40,9 +40,14 @@ zend_class_entry* php_phongo_session_ce;
40
40
41
41
static bool php_phongo_topology_is_sharded_cluster (mongoc_client_t * client )
42
42
{
43
- mongoc_server_description_t * sd = mongoc_client_select_server (client , true, NULL , NULL );
43
+ mongoc_server_description_t * sd ;
44
+ bool ret ;
44
45
45
- return (sd && !strcmp (mongoc_server_description_type (sd ), php_phongo_server_description_type_map [PHONGO_SERVER_MONGOS ].name ));
46
+ sd = mongoc_client_select_server (client , true, NULL , NULL );
47
+ ret = (sd && !strcmp (mongoc_server_description_type (sd ), php_phongo_server_description_type_map [PHONGO_SERVER_MONGOS ].name ));
48
+ mongoc_server_description_destroy (sd );
49
+
50
+ return ret ;
46
51
}
47
52
48
53
static bool php_phongo_session_get_timestamp_parts (zval * obj , uint32_t * timestamp , uint32_t * increment TSRMLS_DC )
You can’t perform that action at this time.
0 commit comments