[PATCH 4.19 050/243] dlm: fix missing idr_destroy for recover_idr

From: Greg Kroah-Hartman
Date: Wed Dec 11 2019 - 10:17:52 EST


From: David Teigland <teigland@xxxxxxxxxx>

[ Upstream commit 8fc6ed9a3508a0435b9270c313600799d210d319 ]

Which would leak memory for the idr internals.

Signed-off-by: David Teigland <teigland@xxxxxxxxxx>
Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>
---
fs/dlm/lockspace.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/fs/dlm/lockspace.c b/fs/dlm/lockspace.c
index 6a1529e478f3d..f1261fa0af8a1 100644
--- a/fs/dlm/lockspace.c
+++ b/fs/dlm/lockspace.c
@@ -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);

/*
--
2.20.1