Commit e4fb0edb7c03e5ec19b6f732f1dfbe911212dbde

Authored by Jeff Layton
Committed by Steve French
1 parent 5220cc9382

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>

Showing 1 changed file with 2 additions and 4 deletions Side-by-side Diff

fs/cifs/smbencrypt.c
... ... @@ -90,12 +90,10 @@
90 90 sg_init_one(&sgout, out, 8);
91 91  
92 92 rc = crypto_blkcipher_encrypt(&desc, &sgout, &sgin, 8);
93   - if (rc) {
  93 + if (rc)
94 94 cERROR(1, "could not encrypt crypt key rc: %d\n", rc);
95   - crypto_free_blkcipher(tfm_des);
96   - goto smbhash_err;
97   - }
98 95  
  96 + crypto_free_blkcipher(tfm_des);
99 97 smbhash_err:
100 98 return rc;
101 99 }