Skip to content

Commit 6203497

Browse files
committed
Fix segfault when tracing and tags don't match
1 parent 618ec76 commit 6203497

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/mongoc/mongoc-server-description.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -880,11 +880,10 @@ mongoc_server_description_filter_tags (
880880

881881
if (found) {
882882
for (i = 0; i < description_len; i++) {
883-
if (!sd_matched[i]) {
883+
if (!sd_matched[i] && descriptions[i]) {
884884
TRACE ("Rejected [%s] [%s], doesn't match tags",
885885
mongoc_server_description_type (descriptions[i]),
886886
descriptions[i]->host.host_and_port);
887-
888887
descriptions[i] = NULL;
889888
}
890889
}

0 commit comments

Comments
 (0)