mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-05 19:24:01 -04:00
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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
494025c634
commit
cd779f2ede
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user