crypto: user - fix memory leak in crypto_reportstat
authorNavid Emamdoost <navid.emamdoost@gmail.com>
Fri, 4 Oct 2019 19:34:54 +0000 (14:34 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 13 Dec 2019 07:49:33 +0000 (08:49 +0100)
commit86d280b5709fea45ece6b47e1f30a2ff4800bee9
tree8c755d831bda199a4a37d59c366533f9d472d531
parentceddd48c8407c4d1c70a815ae229f34c9af44273
crypto: user - fix memory leak in crypto_reportstat

commit c03b04dcdba1da39903e23cc4d072abf8f68f2dd upstream.

In crypto_reportstat, a new skb is created by nlmsg_new(). This skb is
leaked if crypto_reportstat_alg() fails. Required release for skb is
added.

Fixes: cac5818c25d0 ("crypto: user - Implement a generic crypto statistics")
Cc: <stable@vger.kernel.org>
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
crypto/crypto_user_stat.c