linux/drivers/target
Jesper Juhl 6d1802539d [SCSI] target: Fix match_strdup() memory leaks
match_strdup() dynamically allocates memory and it is the responsabillity
of the caller to free that memory. The following three cases:

drivers/target/target_core_file.c:fd_set_configfs_dev_params()
drivers/target/target_core_iblock.c:iblock_set_configfs_dev_params()
drivers/target/target_core_configfs.c:target_core_dev_pr_store_attr_res_aptpl_metadata()

should be kfree()'ing the allocated memory once it is no longer needed.
It also makes sure to return -ENOMEM if the memory allocation in match_strdup()
should fail.  For target_core_configfs.c, this patch adds kfree()'s around
Opt_initiator_fabric, Opt_initiator_node, Opt_initiator_sid, Opt_sa_res_key,
Opt_target_fabric, and Opt_target_node for the Persistent Reservations
Activate Persistence across Target Power Loss (APTPL=1) token parsing.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Nicholas A. Bellinger <nab@linux-iscsi.org>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2011-03-23 11:36:20 -05:00
..
Kconfig
Makefile [SCSI] target: Remove procfs based target_core_mib.c code 2011-02-12 12:15:47 -06:00
target_core_alua.c
target_core_alua.h
target_core_cdb.c [SCSI] target: Fix volume size misreporting for volumes > 2TB 2011-03-14 18:31:08 -05:00
target_core_configfs.c [SCSI] target: Fix match_strdup() memory leaks 2011-03-23 11:36:20 -05:00
target_core_device.c drivers: remove extraneous includes of smp_lock.h 2011-03-02 00:02:40 +01:00
target_core_fabric_configfs.c [SCSI] target: fix use after free detected by SLUB poison 2011-02-12 12:32:41 -06:00
target_core_fabric_lib.c drivers: remove extraneous includes of smp_lock.h 2011-03-02 00:02:40 +01:00
target_core_file.c [SCSI] target: Fix match_strdup() memory leaks 2011-03-23 11:36:20 -05:00
target_core_file.h
target_core_hba.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2011-03-18 10:37:40 -07:00
target_core_hba.h
target_core_iblock.c [SCSI] target: Fix match_strdup() memory leaks 2011-03-23 11:36:20 -05:00
target_core_iblock.h
target_core_pr.c
target_core_pr.h
target_core_pscsi.c [SCSI] target: Fix memory leak on error path in pscsi_alloc_task 2011-03-23 11:36:18 -05:00
target_core_pscsi.h
target_core_rd.c drivers: remove extraneous includes of smp_lock.h 2011-03-02 00:02:40 +01:00
target_core_rd.h
target_core_scdb.c
target_core_scdb.h
target_core_tmr.c [SCSI] target: Fix t_transport_aborted handling in LUN_RESET + active I/O shutdown 2011-02-28 11:23:32 -06:00
target_core_tpg.c drivers: remove extraneous includes of smp_lock.h 2011-03-02 00:02:40 +01:00
target_core_transport.c Merge branch 'config' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/bkl 2011-03-16 17:21:00 -07:00
target_core_ua.c
target_core_ua.h