summaryrefslogtreecommitdiffstats
path: root/fs/dlm
diff options
context:
space:
mode:
authorVasily Averin2018-11-15 11:18:18 +0100
committerGreg Kroah-Hartman2019-01-13 09:51:07 +0100
commit294776562f96efbd9b6a64348020b9e96ccf6e9e (patch)
treeae6151589122542188daa004d44e0fc4d101f9ab /fs/dlm
parentdlm: fixed memory leaks after failed ls_remove_names allocation (diff)
downloadkernel-qcow2-linux-294776562f96efbd9b6a64348020b9e96ccf6e9e.tar.gz
kernel-qcow2-linux-294776562f96efbd9b6a64348020b9e96ccf6e9e.tar.xz
kernel-qcow2-linux-294776562f96efbd9b6a64348020b9e96ccf6e9e.zip
dlm: possible memory leak on error path in create_lkb()
commit 23851e978f31eda8b2d01bd410d3026659ca06c7 upstream. Fixes 3d6aa675fff9 ("dlm: keep lkbs in idr") Cc: stable@kernel.org # 3.1 Signed-off-by: Vasily Averin <vvs@virtuozzo.com> Signed-off-by: David Teigland <teigland@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/dlm')
-rw-r--r--fs/dlm/lock.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/dlm/lock.c b/fs/dlm/lock.c
index cc91963683de..2cb125cc21c9 100644
--- a/fs/dlm/lock.c
+++ b/fs/dlm/lock.c
@@ -1209,6 +1209,7 @@ static int create_lkb(struct dlm_ls *ls, struct dlm_lkb **lkb_ret)
if (rv < 0) {
log_error(ls, "create_lkb idr error %d", rv);
+ dlm_free_lkb(lkb);
return rv;
}