Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
LU-2053 crypto: Fix cfs_crypto_hash memleak
[fs/lustre-release.git]
/
libcfs
/
libcfs
/
linux
/
linux-crypto.c
diff --git
a/libcfs/libcfs/linux/linux-crypto.c
b/libcfs/libcfs/linux/linux-crypto.c
index
bacf26a
..
002b241
100644
(file)
--- a/
libcfs/libcfs/linux/linux-crypto.c
+++ b/
libcfs/libcfs/linux/linux-crypto.c
@@
-249,6
+249,7
@@
int cfs_crypto_hash_final(struct cfs_crypto_hash_desc *hdesc,
if (hash_len == NULL) {
crypto_free_hash(((struct hash_desc *)hdesc)->tfm);
if (hash_len == NULL) {
crypto_free_hash(((struct hash_desc *)hdesc)->tfm);
+ cfs_free(hdesc);
return 0;
}
if (hash == NULL || *hash_len < size) {
return 0;
}
if (hash == NULL || *hash_len < size) {
@@
-262,6
+263,7
@@
int cfs_crypto_hash_final(struct cfs_crypto_hash_desc *hdesc,
return err;
}
crypto_free_hash(((struct hash_desc *)hdesc)->tfm);
return err;
}
crypto_free_hash(((struct hash_desc *)hdesc)->tfm);
+ cfs_free(hdesc);
return err;
}
EXPORT_SYMBOL(cfs_crypto_hash_final);
return err;
}
EXPORT_SYMBOL(cfs_crypto_hash_final);