All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] lightnvm: fix memory leak in pblk_luns_init
@ 2018-02-22 21:01 Huaicheng Li
       [not found] ` <CANr0WEcDSy3YuZ8kaNuB7Z0wFfiV6AwT=bg4W3MNq--2txX2xQ@mail.gmail.com>
  0 siblings, 1 reply; 3+ messages in thread
From: Huaicheng Li @ 2018-02-22 21:01 UTC (permalink / raw)
  To: mb, jg; +Cc: linux-block, linux-kernel

Signed-off-by: Huaicheng Li <huaicheng@cs.uchicago.edu>
---
 drivers/lightnvm/pblk-init.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/lightnvm/pblk-init.c b/drivers/lightnvm/pblk-init.c
index 93d671ca518e..330665d91d8d 100644
--- a/drivers/lightnvm/pblk-init.c
+++ b/drivers/lightnvm/pblk-init.c
@@ -510,6 +510,7 @@ static int pblk_luns_init(struct pblk *pblk, struct ppa_addr *luns)
 		if (ret) {
 			while (--i >= 0)
 				kfree(pblk->luns[i].bb_list);
+			kfree(pblk->luns);
 			return ret;
 		}
 	}
-- 
2.13.6

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-02-23  8:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-22 21:01 [PATCH] lightnvm: fix memory leak in pblk_luns_init Huaicheng Li
     [not found] ` <CANr0WEcDSy3YuZ8kaNuB7Z0wFfiV6AwT=bg4W3MNq--2txX2xQ@mail.gmail.com>
2018-02-23  6:12   ` Matias Bjørling
2018-02-23  8:56     ` Javier González

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.