Skip to content

Commit 693b03f

Browse files
GustavoARSilvagregkh
authored andcommitted
CIFS: fix sha512 check in cifs_crypto_secmech_release
commit 70e8065 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 <[email protected]> Reviewed-by: Aurelien Aptel <[email protected]> CC: Stable <[email protected]> Signed-off-by: Steve French <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 7a55d16 commit 693b03f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/cifs/cifsencrypt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -829,7 +829,7 @@ cifs_crypto_secmech_release(struct TCP_Server_Info *server)
829829
server->secmech.md5 = NULL;
830830
}
831831

832-
if (server->secmech.md5) {
832+
if (server->secmech.sha512) {
833833
crypto_free_shash(server->secmech.sha512);
834834
server->secmech.sha512 = NULL;
835835
}

0 commit comments

Comments
 (0)