summaryrefslogtreecommitdiff
path: root/drivers/staging/lustre/lnet/libcfs
diff options
context:
space:
mode:
authorJames Simmons <jsimmons@infradead.org>2016-05-09 14:53:47 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-06-08 05:38:19 (GMT)
commitcd779f2edec4a33f12144fb1588abc0d220e36bc (patch)
tree5399312567f609774e6783658ec756562f613463 /drivers/staging/lustre/lnet/libcfs
parent494025c634a09f141d9282a5cfdbc24b5415a871 (diff)
downloadlinux-cd779f2edec4a33f12144fb1588abc0d220e36bc.tar.xz
staging: lustre: libcfs: fix memort leak in libcfs crypto layer
During code review Boyko discovered a memory leak. This patch fixes that leak. Signed-off-by: James Simmons <uja.ornl@yahoo.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4423 Reviewed-on: http://review.whamcloud.com/19716 Reviewed-by: Alexander Boyko <alexander.boyko@seagate.com> Reviewed-by: Frank Zago <fzago@cray.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/lustre/lnet/libcfs')
-rw-r--r--drivers/staging/lustre/lnet/libcfs/linux/linux-crypto.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/staging/lustre/lnet/libcfs/linux/linux-crypto.c b/drivers/staging/lustre/lnet/libcfs/linux/linux-crypto.c
index 84f9b7b..5c0116a 100644
--- a/drivers/staging/lustre/lnet/libcfs/linux/linux-crypto.c
+++ b/drivers/staging/lustre/lnet/libcfs/linux/linux-crypto.c
@@ -99,6 +99,7 @@ static int cfs_crypto_hash_alloc(enum cfs_crypto_hash_alg hash_alg,
(*type)->cht_size);
if (err != 0) {
+ ahash_request_free(*req);
crypto_free_ahash(tfm);
return err;
}