Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 25720c2d authored by Patrick Caulfield's avatar Patrick Caulfield Committed by Steven Whitehouse
Browse files

[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: default avatarPatrick Caulfield <pcaulfie@redhat.com>
Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
parent 39d3520c
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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);