linux/drivers/target/iscsi
Dan Carpenter a91918cd3e target/iscsi: Fix double free in lio_target_tiqn_addtpg()
This iscsit_tpg_add_portal_group() function is only called from
lio_target_tiqn_addtpg().  Both functions free the "tpg" pointer on
error so it's a double free bug.  The memory is allocated in the caller
so it should be freed in the caller and not here.

Fixes: e48354ce07 ("iscsi-target: Add iSCSI fabric support for target v4.1")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: David Disseldorp <ddiss@suse.de>
[ bvanassche: Added "Fix" at start of patch title ]
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
2016-12-16 11:15:11 +01:00
..
cxgbit cxgbit: Add an #include directive 2016-12-09 10:20:11 -08:00
iscsi_target_auth.c target: Minimize #include directives 2016-12-09 10:22:28 -08:00
iscsi_target_auth.h target: Minimize #include directives 2016-12-09 10:22:28 -08:00
iscsi_target_configfs.c target: Minimize #include directives 2016-12-09 10:22:28 -08:00
iscsi_target_datain_values.c target: Minimize #include directives 2016-12-09 10:22:28 -08:00
iscsi_target_datain_values.h target: Minimize #include directives 2016-12-09 10:22:28 -08:00
iscsi_target_device.c target: Fix max_cmd_sn increment w/o cmdsn mutex regressions 2015-09-11 00:32:28 -07:00
iscsi_target_device.h target: Minimize #include directives 2016-12-09 10:22:28 -08:00
iscsi_target_erl0.c iscsi-target: remove usage of ->shutdown_session 2016-05-10 01:19:41 -07:00
iscsi_target_erl0.h target: Minimize #include directives 2016-12-09 10:22:28 -08:00
iscsi_target_erl1.c target: Minimize #include directives 2016-12-09 10:22:28 -08:00
iscsi_target_erl1.h target: Minimize #include directives 2016-12-09 10:22:28 -08:00
iscsi_target_erl2.c target: Minimize #include directives 2016-12-09 10:22:28 -08:00
iscsi_target_erl2.h target: Minimize #include directives 2016-12-09 10:22:28 -08:00
iscsi_target_login.c target: Minimize #include directives 2016-12-09 10:22:28 -08:00
iscsi_target_login.h target: Minimize #include directives 2016-12-09 10:22:28 -08:00
iscsi_target_nego.c target: Minimize #include directives 2016-12-09 10:22:28 -08:00
iscsi_target_nego.h target: Minimize #include directives 2016-12-09 10:22:28 -08:00
iscsi_target_nodeattrib.c iscsi-target: Move iscsi_target_[core,stat].h under linux include 2015-01-30 13:06:21 -08:00
iscsi_target_nodeattrib.h target: Minimize #include directives 2016-12-09 10:22:28 -08:00
iscsi_target_parameters.c target: Minimize #include directives 2016-12-09 10:22:28 -08:00
iscsi_target_parameters.h target: Minimize #include directives 2016-12-09 10:22:28 -08:00
iscsi_target_seq_pdu_list.c iscsi-target: Move iscsi_target_[core,stat].h under linux include 2015-01-30 13:06:21 -08:00
iscsi_target_seq_pdu_list.h target: Minimize #include directives 2016-12-09 10:22:28 -08:00
iscsi_target_stat.c target: use per-attribute show and store methods 2015-10-13 22:17:49 -07:00
iscsi_target_tmr.c iscsi-target: Fix indentation + spelling + unreachable code 2016-01-06 13:39:19 -08:00
iscsi_target_tmr.h target: Minimize #include directives 2016-12-09 10:22:28 -08:00
iscsi_target_tpg.c target/iscsi: Fix double free in lio_target_tiqn_addtpg() 2016-12-16 11:15:11 +01:00
iscsi_target_tpg.h target: Minimize #include directives 2016-12-09 10:22:28 -08:00
iscsi_target_transport.c target: Minimize #include directives 2016-12-09 10:22:28 -08:00
iscsi_target_util.c target: Minimize #include directives 2016-12-09 10:22:28 -08:00
iscsi_target_util.h target: Minimize #include directives 2016-12-09 10:22:28 -08:00
iscsi_target.c target: Minimize #include directives 2016-12-09 10:22:28 -08:00
iscsi_target.h target: Minimize #include directives 2016-12-09 10:22:28 -08:00
Kconfig cxgbit: add files for cxgbit.ko 2016-05-09 23:12:54 -07:00
Makefile cxgbit: add files for cxgbit.ko 2016-05-09 23:12:54 -07:00