Similar to commit 34bca9bbe7a8 ("cifs: Use kzfree() to free password"), password strings allocated for CHAP should be zero-ed before freed.
Signed-off-by: Wang Xiayang <xywang.s...@sjtu.edu.cn> --- drivers/scsi/libiscsi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c index ebd47c0cf9e9..67d66e6dbdb0 100644 --- a/drivers/scsi/libiscsi.c +++ b/drivers/scsi/libiscsi.c @@ -2854,8 +2854,8 @@ void iscsi_session_teardown(struct iscsi_cls_session *cls_session) iscsi_remove_session(cls_session); - kfree(session->password); - kfree(session->password_in); + kzfree(session->password); + kzfree(session->password_in); kfree(session->username); kfree(session->username_in); kfree(session->targetname); -- 2.11.0 -- You received this message because you are subscribed to the Google Groups "open-iscsi" group. To unsubscribe from this group and stop receiving emails from it, send an email to open-iscsi+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/open-iscsi/20190727103958.2260-1-xywang.sjtu%40sjtu.edu.cn.