linux-stable/drivers/lightnvm
Wei Yongjun 5136a4fd58 lightnvm: fix possible memory leak in pblk_bb_discovery()
'blks' is malloced in pblk_bb_discovery() and should be freed
before leaving from the nvm_get_tgt_bb_tbl() error handling cases,
otherwise it will cause memory leak. Also skip assign blks to
rlun->bb_list when error.

Fixes: a4bd217b43 ("lightnvm: physical block device (pblk) target")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Reviewed-by: Javier González <javier@cnexlabs.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
2017-04-25 10:44:29 -06:00
..
core.c lightnvm: propagate pblk_init return to userspace 2017-04-21 12:40:41 -06:00
Kconfig lightnvm: physical block device (pblk) target 2017-04-16 10:06:33 -06:00
Makefile lightnvm: physical block device (pblk) target 2017-04-16 10:06:33 -06:00
pblk-cache.c lightnvm: physical block device (pblk) target 2017-04-16 10:06:33 -06:00
pblk-core.c lightnvm: pblk: fix erase counters on error fail 2017-04-23 16:57:52 -06:00
pblk-gc.c lightnvm: pblk: fix erase counters on error fail 2017-04-23 16:57:52 -06:00
pblk-init.c lightnvm: fix possible memory leak in pblk_bb_discovery() 2017-04-25 10:44:29 -06:00
pblk-map.c lightnvm: pblk: fix erase counters on error fail 2017-04-23 16:57:52 -06:00
pblk-rb.c lightnvm: physical block device (pblk) target 2017-04-16 10:06:33 -06:00
pblk-read.c lightnvm: don't print a warning for ADDR_EMPTY 2017-04-21 16:49:56 -06:00
pblk-recovery.c lightnvm: fix some WARN() messages 2017-04-16 10:06:34 -06:00
pblk-rl.c lightnvm: pblk: fix erase counters on error fail 2017-04-23 16:57:52 -06:00
pblk-sysfs.c lightnvm: physical block device (pblk) target 2017-04-16 10:06:33 -06:00
pblk-write.c lightnvm: pblk: fix erase counters on error fail 2017-04-23 16:57:52 -06:00
pblk.h lightnvm: pblk: fix erase counters on error fail 2017-04-23 16:57:52 -06:00
rrpc.c lightnvm: fix type checks on rrpc 2017-04-16 10:06:25 -06:00
rrpc.h lightnvm: use end_io callback instead of instance 2017-01-31 08:32:13 -07:00