Skip to content

Commit

Permalink
CIFS: fix sha512 check in cifs_crypto_secmech_release
Browse files Browse the repository at this point in the history
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: 1c6614d ("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]>
  • Loading branch information
GustavoARSilva authored and Steve French committed Apr 2, 2018
1 parent 8bd68c6 commit 70e8065
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/cifs/cifsencrypt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 70e8065

Please sign in to comment.