]> git.baikalelectronics.ru Git - kernel.git/commit
target: Fix a memory leak in target_dev_lba_map_store()
authorBart Van Assche <bart.vanassche@sandisk.com>
Tue, 5 Jan 2016 13:47:17 +0000 (14:47 +0100)
committerNicholas Bellinger <nab@linux-iscsi.org>
Thu, 7 Jan 2016 21:57:55 +0000 (13:57 -0800)
commit692dcb165846946554e13315f34f30624b8e4415
treeeaf1eb68b8c884bd70ac40e648488b48e366ba50
parentbb88b30b226042e3a22af95de56f524b5c393102
target: Fix a memory leak in target_dev_lba_map_store()

strsep() modifies its first argument. Make the pointer passed to kfree()
match the return value of kmalloc().

Fixes: 577cccac9513 (commit "target_core_alua: Referrals configfs integration")
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Cc: Hannes Reinecke <hare@suse.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Andy Grover <agrover@redhat.com>
Cc: Sagi Grimberg <sagig@mellanox.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/target/target_core_configfs.c