ctrl->dh_key might be used across multiple calls to nvmet_setup_dhgroup()Now that is obviously correct.
for the same controller. So it's better to nullify it after release on
error path in order to avoid double free later in nvmet_destroy_auth().
Found by Linux Verification Center (linuxtesting.org) with Svace.
Fixes: 7a277c37d352 ("nvmet-auth: Diffie-Hellman key exchange support")
Cc: stable@xxxxxxxxxxxxxxx
Signed-off-by: Vitaliy Shevtsov <v.shevtsov@xxxxxxxxx>
---
drivers/nvme/target/auth.c | 1 +
1 file changed, 1 insertion(+)