@@ -2069,19 +2069,22 @@ _reset (mongoc_client_pool_t **pool,
2069
2069
{
2070
2070
bson_t * kms_providers ;
2071
2071
mongoc_uri_t * uri ;
2072
- bson_t * extra ;
2073
2072
bson_t * schema ;
2074
2073
bson_t * schema_map ;
2075
2074
2076
2075
mongoc_auto_encryption_opts_destroy (* opts );
2077
2076
* opts = mongoc_auto_encryption_opts_new ();
2078
- extra = BCON_NEW ("mongocryptdBypassSpawn" , BCON_BOOL (true));
2079
- mongoc_auto_encryption_opts_set_extra (* opts , extra );
2080
- char * env_cryptSharedLibPath =
2081
- test_framework_getenv ("MONGOC_TEST_CRYPT_SHARED_LIB_PATH" );
2082
- if (env_cryptSharedLibPath ) {
2083
- BSON_APPEND_UTF8 (extra , "cryptSharedLibPath" , env_cryptSharedLibPath );
2084
- bson_free (env_cryptSharedLibPath );
2077
+ {
2078
+ bson_t * const extra =
2079
+ BCON_NEW ("mongocryptdBypassSpawn" , BCON_BOOL (true));
2080
+ char * env_cryptSharedLibPath =
2081
+ test_framework_getenv ("MONGOC_TEST_CRYPT_SHARED_LIB_PATH" );
2082
+ if (env_cryptSharedLibPath ) {
2083
+ BSON_APPEND_UTF8 (extra , "cryptSharedLibPath" , env_cryptSharedLibPath );
2084
+ bson_free (env_cryptSharedLibPath );
2085
+ }
2086
+ mongoc_auto_encryption_opts_set_extra (* opts , extra );
2087
+ bson_destroy (extra );
2085
2088
}
2086
2089
mongoc_auto_encryption_opts_set_keyvault_namespace (* opts , "db" , "keyvault" );
2087
2090
kms_providers = _make_kms_providers (false /* aws */ , true /* local */ );
@@ -2137,7 +2140,6 @@ _reset (mongoc_client_pool_t **pool,
2137
2140
}
2138
2141
bson_destroy (schema );
2139
2142
bson_destroy (schema_map );
2140
- bson_destroy (extra );
2141
2143
bson_destroy (kms_providers );
2142
2144
}
2143
2145
0 commit comments