commit | 0fb889b83186e54c0cfa79516599f2267fb553fb | [log] [tgz] |
---|---|---|
author | Wei Yongjun <yongjun_wei@trendmicro.com.cn> | Fri Mar 15 17:19:26 2013 +0800 |
committer | Nicholas Bellinger <nab@linux-iscsi.org> | Mon Mar 18 12:45:52 2013 -0700 |
tree | 8410aed12c23a81cdd838999b63108421d49a34d | |
parent | 7ac9ad11b2a5cf77a92b58ee6b672ad2fa155eb1 [diff] |
target: fix possible memory leak in core_tpg_register() 'se_tpg->tpg_lun_list' is malloced in core_tpg_register() and should be freed before leaving from the error handling cases, otherwise it will cause memory leak. 'se_tpg' is malloced out of this function, and will be freed if we return error, so remove free for 'se_tpg'. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>