提交 6af1f93e 编写于 作者: C Christian Engelmayer 提交者: Herbert Xu

crypto: tcrypt - 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: NChristian Engelmayer <cengelma@gmx.at>
Reviewed-by: NMarek Vasut <marex@denx.de>
Acked-by: NTim Chen <tim.c.chen@linux.intel.com>
Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
上级 a2ea6ed6
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册