linux/drivers/target
Jesper Juhl 872105689e [SCSI] target: Avoid mem leak and needless work in transport_generic_get_mem
In drivers/target/target_core_transport.c::transport_generic_get_mem()
there are a few potential memory leaks in the error paths. This patch
makes sure that we free previously allocated memory when other allocations
fail.  It also moves some work (INIT_LIST_HEAD() and assignment to
se_mem->se_len) below all the allocations so that if something fails we
don't do the work at all.

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:39 -05:00
..
Kconfig
Makefile [SCSI] target: remove EXTRA_CFLAGS 2011-03-23 11:36:24 -05: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: Convert backend ->create_virtdevice() call to return ERR_PTR 2011-03-23 11:36:24 -05:00
target_core_device.c [SCSI] target: Minor sparse warning fixes and annotations 2011-03-23 11:36:29 -05: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 [SCSI] target: Minor sparse warning fixes and annotations 2011-03-23 11:36:29 -05:00
target_core_file.c [SCSI] target: Convert backend ->create_virtdevice() call to return ERR_PTR 2011-03-23 11:36:24 -05:00
target_core_file.h
target_core_hba.c [SCSI] target: Remove unnecessary hba_dev_list walk and se_clear_dev_ports legacy code 2011-03-23 11:36:27 -05:00
target_core_hba.h
target_core_iblock.c [SCSI] target: Convert backend ->create_virtdevice() call to return ERR_PTR 2011-03-23 11:36:24 -05:00
target_core_iblock.h
target_core_pr.c
target_core_pr.h
target_core_pscsi.c [SCSI] target: Minor sparse warning fixes and annotations 2011-03-23 11:36:29 -05:00
target_core_pscsi.h
target_core_rd.c [SCSI] target: Convert rd_build_device_space() to use errno 2011-03-23 11:36:32 -05:00
target_core_rd.h [SCSI] target: Minor sparse warning fixes and annotations 2011-03-23 11:36:29 -05:00
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 [SCSI] target: Avoid mem leak and needless work in transport_generic_get_mem 2011-03-23 11:36:39 -05:00
target_core_ua.c
target_core_ua.h