From: Gustavo A. R. Silva Date: Mon, 19 Feb 2018 17:11:13 +0000 (-0600) Subject: CIFS: fix sha512 check in cifs_crypto_secmech_release X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=693b03f9b185f14dded38a934c744a60e99363c3;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git CIFS: fix sha512 check in cifs_crypto_secmech_release commit 70e80655f58e17a2e38e577e1b4fa7a8c99619a0 upstream. It seems this is a copy-paste error and that the proper variable to use in this particular case is _sha512_ instead of _md5_. Addresses-Coverity-ID: 1465358 ("Copy-paste error") Fixes: 1c6614d229e7 ("CIFS: add sha512 secmech") Signed-off-by: Gustavo A. R. Silva Reviewed-by: Aurelien Aptel CC: Stable Signed-off-by: Steve French Signed-off-by: Greg Kroah-Hartman --- diff --git a/fs/cifs/cifsencrypt.c b/fs/cifs/cifsencrypt.c index 6fa6d459678e..a6ef088e057b 100644 --- a/fs/cifs/cifsencrypt.c +++ b/fs/cifs/cifsencrypt.c @@ -829,7 +829,7 @@ cifs_crypto_secmech_release(struct TCP_Server_Info *server) server->secmech.md5 = NULL; } - if (server->secmech.md5) { + if (server->secmech.sha512) { crypto_free_shash(server->secmech.sha512); server->secmech.sha512 = NULL; }