Skip to contentSkip to conversation

dlm: possible memory leak on error path in create_lkb()

PATCH New Vasily Averin 1 participant 1 message Nov 15, 2018 Distributed lock manager (DLM)

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 dlm: possible memory leak on error path in create_lkb()

Fixes 3d6aa675fff9 ("dlm: keep lkbs in idr")
Cc: stable at kernel.org # 3.1

---
 fs/dlm/lock.c | 1 +
 1 file changed, 1 insertion(+)
fs/dlm/lock.c +1 -0
index cc91963683de..2cb125cc21c9 100644
@@ -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;
 	}
 
Signature · 1 line
2.17.1