]> git.baikalelectronics.ru Git - kernel.git/commit
nvme: fix potential memory leak in option parsing
authorChengguang Xu <cgxu519@gmx.com>
Sat, 14 Apr 2018 12:06:19 +0000 (20:06 +0800)
committerJens Axboe <axboe@kernel.dk>
Thu, 3 May 2018 15:37:50 +0000 (09:37 -0600)
commit57062cb503b402efdd043977a856390cad35cc21
tree9d79f052fe5f935e926c0e6664e7c62aeae4056f
parent4ed582a397505c979e6221e683402ed038a48798
nvme: fix potential memory leak in option parsing

When specifying same string type option several times,
current option parsing may cause memory leak. Hence,
call kfree for previous one in this case.

Signed-off-by: Chengguang Xu <cgxu519@gmx.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Keith Busch <keith.busch@intel.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/nvme/host/fabrics.c