[PATCH 0/3] Cleanup ressource leaks in test_aead_speed()

2014-04-21 Thread Christian Engelmayer
This is a cleanup of Coverity ressource leak findings for the quick dirty crypto testing module crypto/tcrypt.c. All 3 changesets address function test_aead_speed() that was introduced in 53f52d7a (crypto: tcrypt - Added speed tests for AEAD crypto alogrithms in tcrypt test suite) The series

[PATCH 1/3] crypto: Fix potential leak in test_aead_speed() if aad_size is too big

2014-04-21 Thread Christian Engelmayer
Fix a potential memory leak in the error handling of test_aead_speed(). In case the size check on the associate data length parameter fails, the function goes through the wrong exit label. Reported by Coverity - CID 1163870. Signed-off-by: Christian Engelmayer cenge...@gmx.at --- crypto/tcrypt.c

[PATCH 3/3] crypto: Fix leak of struct aead_request in test_aead_speed()

2014-04-21 Thread Christian Engelmayer
Fix leakage of memory for struct aead_request that is allocated via aead_request_alloc() but not released via aead_request_free(). Reported by Coverity - CID 1163869. Signed-off-by: Christian Engelmayer cenge...@gmx.at --- crypto/tcrypt.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)

[PATCH 2/3] crypto: Fix potential leak in test_aead_speed() if crypto_alloc_aead() fails

2014-04-21 Thread Christian Engelmayer
Fix a potential memory leak in the error handling of test_aead_speed(). In case crypto_alloc_aead() fails, the function returns without going through the centralized cleanup path. Reported by Coverity - CID 1163870. Signed-off-by: Christian Engelmayer cenge...@gmx.at --- crypto/tcrypt.c | 3 ++-