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)
commitf0a8afecb29ad0005e7e946228a0ef5422058b85
treeeaf1eb68b8c884bd70ac40e648488b48e366ba50
parent5261d86c5ce5726f097ed5e4ea28c40684ebf8e4
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: 229d4f112fd6 (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