Skip to content

Commit f18c866

Browse files
committed
CDRIVER-2252 leak in mongoc_client_kill_cursors
Very minor leak: the topology must include incompatible servers, so no operations will succeed in any case, and the application must call the deprecated and useless mongoc_client_kill_cursors function repeatedly.
1 parent a3abe9d commit f18c866

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/mongoc/mongoc-client.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1843,6 +1843,7 @@ mongoc_client_kill_cursor (mongoc_client_t *client, int64_t cursor_id)
18431843
if (!mongoc_topology_compatible (&topology->description, NULL, &error)) {
18441844
MONGOC_ERROR ("Could not kill cursor: %s", error.message);
18451845
mongoc_mutex_unlock (&topology->mutex);
1846+
mongoc_read_prefs_destroy (read_prefs);
18461847
return;
18471848
}
18481849

0 commit comments

Comments
 (0)