File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -1248,6 +1248,8 @@ typedef struct {
1248
1248
bson_t agg_reply ;
1249
1249
} resume_at_optime_ctx_t ;
1250
1250
1251
+ #define RESUME_AT_OPTIME_INITIALIZER { false, false, BSON_INITIALIZER}
1252
+
1251
1253
static void
1252
1254
_resume_at_optime_started (const mongoc_apm_command_started_t * event )
1253
1255
{
@@ -1286,6 +1288,7 @@ _resume_at_optime_succeeded (const mongoc_apm_command_succeeded_t *event)
1286
1288
event );
1287
1289
if (!strcmp (mongoc_apm_command_succeeded_get_command_name (event ),
1288
1290
"aggregate" )) {
1291
+ bson_destroy (& ctx -> agg_reply );
1289
1292
bson_copy_to (mongoc_apm_command_succeeded_get_reply (event ),
1290
1293
& ctx -> agg_reply );
1291
1294
}
@@ -1301,7 +1304,7 @@ test_change_stream_resume_at_optime (void *test_ctx)
1301
1304
const bson_t * doc ;
1302
1305
bson_error_t error ;
1303
1306
mongoc_apm_callbacks_t * callbacks ;
1304
- resume_at_optime_ctx_t ctx = { 0 } ;
1307
+ resume_at_optime_ctx_t ctx = RESUME_AT_OPTIME_INITIALIZER ;
1305
1308
1306
1309
callbacks = mongoc_apm_callbacks_new ();
1307
1310
mongoc_apm_set_command_started_cb (callbacks , _resume_at_optime_started );
You can’t perform that action at this time.
0 commit comments