From cd779f2edec4a33f12144fb1588abc0d220e36bc Mon Sep 17 00:00:00 2001 From: James Simmons Date: Mon, 9 May 2016 10:53:47 -0400 Subject: [PATCH] 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 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4423 Reviewed-on: http://review.whamcloud.com/19716 Reviewed-by: Alexander Boyko Reviewed-by: Frank Zago Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman --- drivers/staging/lustre/lnet/libcfs/linux/linux-crypto.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/lustre/lnet/libcfs/linux/linux-crypto.c b/drivers/staging/lustre/lnet/libcfs/linux/linux-crypto.c index 84f9b7b47581..5c0116ade909 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; } -- 2.30.2