Skip to content

Commit cbe6b33

Browse files
bjorihanumantmk
authored andcommitted
CDRIVER-485: Invalid read on authentication failure
Closes #141
1 parent 4ede394 commit cbe6b33

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/mongoc/mongoc-cluster.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1634,11 +1634,11 @@ _mongoc_cluster_auth_node_plain (mongoc_cluster_t *cluster,
16341634
BSON_ITER_HOLDS_UTF8 (&iter)) {
16351635
errmsg = bson_iter_utf8 (&iter, NULL);
16361636
}
1637-
bson_destroy (&reply);
16381637
bson_set_error (error,
16391638
MONGOC_ERROR_CLIENT,
16401639
MONGOC_ERROR_CLIENT_AUTHENTICATE,
16411640
"%s", errmsg);
1641+
bson_destroy (&reply);
16421642
return false;
16431643
}
16441644

0 commit comments

Comments
 (0)