diff options
author | Gustavo A. R. Silva <gustavo@embeddedor.com> | 2018-02-19 11:11:13 -0600 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-04-24 09:42:54 +0200 |
commit | f8a7eccf97d352de9b5ccf0606f0d13c8a3d5e46 (patch) | |
tree | cd9e52abf6a3c11bf040d17f3dfcba591882b0d0 /fs/cifs | |
parent | 4baf0819b61d677aebd59113ab68c3bafc08d2dc (diff) | |
download | linux-rt-f8a7eccf97d352de9b5ccf0606f0d13c8a3d5e46.tar.gz |
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 <gustavo@embeddedor.com>
Reviewed-by: Aurelien Aptel <aaptel@suse.com>
CC: Stable <stable@vger.kernel.org>
Signed-off-by: Steve French <smfrench@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/cifs')
-rw-r--r-- | fs/cifs/cifsencrypt.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; } |