]> git.baikalelectronics.ru Git - kernel.git/commit
nvme-fabrics: fix memory leak when parsing host ID option
authorRoland Dreier <roland@purestorage.com>
Thu, 11 Jan 2018 21:38:00 +0000 (13:38 -0800)
committerChristoph Hellwig <hch@lst.de>
Mon, 15 Jan 2018 16:09:31 +0000 (17:09 +0100)
commit43f75587f1e5d5de3f87d1e92b082ff037bef768
treeb6564018f48115e5489dd9066f266cbd3b70444a
parentf5c2e682ad2b9544aa7d63d0f6b3ac1ab0875376
nvme-fabrics: fix memory leak when parsing host ID option

We use match_strdup() to get a copy of the option string for host ID string, but
we just pass it to uuid_parse() and don't store the string pointer, so we need to
kfree() the string after parsing it.

Signed-off-by: Roland Dreier <roland@purestorage.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/host/fabrics.c