]> Pileus Git - ~andy/linux/blobdiff - fs/dlm/lowcomms.c
[DLM] Clear othercon pointers when a connection is closed
[~andy/linux] / fs / dlm / lowcomms.c
index dd362739d291e8a5d125ec2d2172e19d497bdecc..d15fd5f9f5c562f17f9a275a2c7646c948d72a83 100644 (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);