Re: [PATCH 3/3] crypto: Fix leak of struct aead_request in test_aead_speed()
On Mon, 2014-04-21 at 20:47 +0200, Christian Engelmayer wrote: > 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 Acked. Thanks for fixing the leak. Tim > --- > crypto/tcrypt.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/crypto/tcrypt.c b/crypto/tcrypt.c > index 1849155..09c93ff2 100644 > --- a/crypto/tcrypt.c > +++ b/crypto/tcrypt.c > @@ -320,7 +320,7 @@ static void test_aead_speed(const char *algo, int enc, > unsigned int sec, > if (!req) { > pr_err("alg: aead: Failed to allocate request for %s\n", > algo); > - goto out; > + goto out_noreq; > } > > i = 0; > @@ -390,6 +390,8 @@ static void test_aead_speed(const char *algo, int enc, > unsigned int sec, > } while (*keysize); > > out: > + aead_request_free(req); > +out_noreq: > crypto_free_aead(tfm); > out_notfm: > kfree(sg); -- To unsubscribe from this list: send the line "unsubscribe linux-crypto" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 3/3] crypto: Fix leak of struct aead_request in test_aead_speed()
On Monday, April 21, 2014 at 08:47:05 PM, Christian Engelmayer wrote: > 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 Reviewed-by: Marek Vasut Best regards, Marek Vasut -- To unsubscribe from this list: send the line "unsubscribe linux-crypto" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 3/3] crypto: Fix leak of struct aead_request in test_aead_speed()
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 --- crypto/tcrypt.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crypto/tcrypt.c b/crypto/tcrypt.c index 1849155..09c93ff2 100644 --- a/crypto/tcrypt.c +++ b/crypto/tcrypt.c @@ -320,7 +320,7 @@ static void test_aead_speed(const char *algo, int enc, unsigned int sec, if (!req) { pr_err("alg: aead: Failed to allocate request for %s\n", algo); - goto out; + goto out_noreq; } i = 0; @@ -390,6 +390,8 @@ static void test_aead_speed(const char *algo, int enc, unsigned int sec, } while (*keysize); out: + aead_request_free(req); +out_noreq: crypto_free_aead(tfm); out_notfm: kfree(sg); -- 1.9.1 signature.asc Description: PGP signature