]> git.baikalelectronics.ru Git - kernel.git/commit
tls: Fixed a memory leak during socket close
authorVakul Garg <vakul.garg@nxp.com>
Tue, 25 Sep 2018 14:51:51 +0000 (20:21 +0530)
committerDavid S. Miller <davem@davemloft.net>
Tue, 25 Sep 2018 17:46:59 +0000 (10:46 -0700)
commit9b0e3af3c69134f9e83bb524a1ef07be23b4f720
treee32f6a52ca75b0c1586017cca6ba67640a220937
parent0183146368ebeba2865a08f9f3628a48f88b27c8
tls: Fixed a memory leak during socket close

During socket close, if there is a open record with tx context, it needs
to be be freed apart from freeing up plaintext and encrypted scatter
lists. This patch frees up the open record if present in tx context.

Also tls_free_both_sg() has been renamed to tls_free_open_rec() to
indicate that the free record in tx context is being freed inside the
function.

Fixes: 4e09428b5ad7 ("net/tls: Add support for async encryption")
Signed-off-by: Vakul Garg <vakul.garg@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/tls/tls_sw.c