Skip to content

Commit b8b35e8

Browse files
committed
leaks in tests, 2
1 parent da0d72c commit b8b35e8

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

Diff for: tests/mock_server/mock-rs.c

+2
Original file line numberDiff line numberDiff line change
@@ -498,11 +498,13 @@ mock_rs_receives_command (mock_rs_t *rs,
498498
formatted_command_json,
499499
NULL,
500500
true)) {
501+
bson_free (formatted_command_json);
501502
request_destroy (request);
502503
return NULL;
503504
}
504505

505506
bson_free (ns);
507+
bson_free (formatted_command_json);
506508

507509
return request;
508510
}

Diff for: tests/test-mongoc-database.c

+1
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ test_command (void)
125125
assert (error.code == MONGOC_ERROR_QUERY_COMMAND_NOT_FOUND);
126126
assert (strstr (error.message, "a_non_existing_command"));
127127

128+
bson_destroy (&reply);
128129
mongoc_database_destroy (database);
129130
mongoc_client_destroy (client);
130131
bson_destroy (&cmd);

0 commit comments

Comments
 (0)