]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
dlm: fix missing idr_destroy for recover_idr
authorDavid Teigland <teigland@redhat.com>
Thu, 15 Nov 2018 17:17:40 +0000 (11:17 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 13 Dec 2019 07:51:20 +0000 (08:51 +0100)
[ Upstream commit 8fc6ed9a3508a0435b9270c313600799d210d319 ]

Which would leak memory for the idr internals.

Signed-off-by: David Teigland <teigland@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/dlm/lockspace.c

index 6a1529e478f3df786419e7c2ffc4d7d748a24fa8..f1261fa0af8a14357ea4bc21c91de4866ab5ac0e 100644 (file)
@@ -807,6 +807,7 @@ static int release_lockspace(struct dlm_ls *ls, int force)
 
        dlm_delete_debug_file(ls);
 
+       idr_destroy(&ls->ls_recover_idr);
        kfree(ls->ls_recover_buf);
 
        /*