On 7/27/19 3:39 AM, Wang Xiayang wrote:
> 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 <[email protected]>
> ---
> 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);
Reviewed-by: Lee Duncan <[email protected]>
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/open-iscsi/4d2430d7-8eec-2d52-263e-41bf468598e0%40suse.com.