[DLM] Clear othercon pointers when a connection is closed

This patch clears the othercon pointer and frees the memory when a connnection
is closed. This could cause a small memory leak when nodes leave the cluster.

Signed-Off-By: Patrick Caulfield <pcaulfie@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
This commit is contained in:
Patrick Caulfield 2007-07-11 13:39:43 +01:00 committed by Steven Whitehouse
parent 39d3520c92
commit 25720c2d73
1 changed files with 2 additions and 0 deletions

View File

@ -327,6 +327,8 @@ static void close_connection(struct connection *con, bool and_other)
if (con->othercon && and_other) {
/* Will only re-enter once. */
close_connection(con->othercon, false);
kmem_cache_free(con_cache, con->othercon);
con->othercon = NULL;
}
if (con->rx_page) {
__free_page(con->rx_page);