From: Vasily Averin Date: Thu, 15 Nov 2018 10:18:18 +0000 (+0300) Subject: dlm: possible memory leak on error path in create_lkb() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4e28e1e18dbdcb3e351962f0c09c03e2a58dba44;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git 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 Signed-off-by: David Teigland Signed-off-by: Greg Kroah-Hartman --- diff --git a/fs/dlm/lock.c b/fs/dlm/lock.c index 35502d4046f5..1d404c832e33 100644 --- a/fs/dlm/lock.c +++ b/fs/dlm/lock.c @@ -1210,6 +1210,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; }