]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: testmgr - Fix potential memory leak in test_akcipher_one()
authorTianjia Zhang <tianjia.zhang@linux.alibaba.com>
Sun, 20 Sep 2020 16:20:59 +0000 (00:20 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 25 Sep 2020 07:48:54 +0000 (17:48 +1000)
commit6430b7185d8faccf6c8ee888cbb430379f8ea129
treefd5ffe947839c62b0c9fb67f8970ba157a25a389
parentf7c77a667f9eb5d249494c669da6af6dc39b1901
crypto: testmgr - Fix potential memory leak in test_akcipher_one()

When the 'key' allocation fails, the 'req' will not be released,
which will cause memory leakage on this path. This patch adds a
'free_req' tag used to solve this problem, and two new err values
are added to reflect the real reason of the error.

Signed-off-by: Tianjia Zhang <tianjia.zhang@linux.alibaba.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/testmgr.c