Skip to content

Commit 5a37ac0

Browse files
committed
CDRIVER-899 segfault in test_get_host
Must destroy cursor before destroying client, not after.
1 parent 46ff8b2 commit 5a37ac0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/test-mongoc-cursor.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ test_get_host (void)
4545

4646
bson_free (uri_str);
4747
mongoc_uri_destroy(uri);
48-
mongoc_client_destroy (client);
4948
mongoc_cursor_destroy (cursor);
49+
mongoc_client_destroy (client);
5050
}
5151

5252
static void

0 commit comments

Comments
 (0)