mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-04-11 00:28:02 +07:00
cifs: free blkcipher in smbhash
This is currently leaked in the rc == 0 case. Reported-by: J. Bruce Fields <bfields@fieldses.org> Signed-off-by: Jeff Layton <jlayton@redhat.com> Reviewed-by: Shirish Pargaonkar <shirishpargaonkar@gmail.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
This commit is contained in:
parent
5220cc9382
commit
e4fb0edb7c
@ -90,12 +90,10 @@ smbhash(unsigned char *out, const unsigned char *in, unsigned char *key)
|
|||||||
sg_init_one(&sgout, out, 8);
|
sg_init_one(&sgout, out, 8);
|
||||||
|
|
||||||
rc = crypto_blkcipher_encrypt(&desc, &sgout, &sgin, 8);
|
rc = crypto_blkcipher_encrypt(&desc, &sgout, &sgin, 8);
|
||||||
if (rc) {
|
if (rc)
|
||||||
cERROR(1, "could not encrypt crypt key rc: %d\n", rc);
|
cERROR(1, "could not encrypt crypt key rc: %d\n", rc);
|
||||||
crypto_free_blkcipher(tfm_des);
|
|
||||||
goto smbhash_err;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
crypto_free_blkcipher(tfm_des);
|
||||||
smbhash_err:
|
smbhash_err:
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user