[PATCH -next] nvmet-auth: Fix the error handling path in nvmet_auth_host_hash and nvmet_auth_ctrl_hash

Hannes Reinecke hare at suse.de
Sat Jul 6 06:15:25 PDT 2024


On 7/6/24 08:46, Gaosheng Cui wrote:
> If we fail to call nvme_auth_augmented_challenge, or fail to kmalloc
> for shash, we should free the memory allocation for challenge, so add
> err path out_free_challenge to fix the memory leak.
> 
> Fixes: 7a277c37d352 ("nvmet-auth: Diffie-Hellman key exchange support")
> Signed-off-by: Gaosheng Cui <cuigaosheng1 at huawei.com>
> ---
>   drivers/nvme/target/auth.c | 14 ++++++++------
>   1 file changed, 8 insertions(+), 6 deletions(-)
> 
Reviewed-by: Hannes Reinecke <hare at suse.de>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke                  Kernel Storage Architect
hare at suse.de                                +49 911 74053 688
SUSE Software Solutions GmbH, Frankenstr. 146, 90461 Nürnberg
HRB 36809 (AG Nürnberg), GF: I. Totev, A. McDonald, W. Knoblich




More information about the Linux-nvme mailing list