net/tls: fix the IV leaks
authorJakub Kicinski <jakub.kicinski@netronome.com>
Wed, 10 Apr 2019 18:04:30 +0000 (11:04 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 16 May 2019 17:41:27 +0000 (19:41 +0200)
commit85b9e8694f9c03d508398bdb930e7d2109d07855
treebca9f3fcf6af2fab08eabd5122c7b568f1b83067
parente38c6748d1ccf4b0651750289389168de722e934
net/tls: fix the IV leaks

[ Upstream commit 5a03bc73abed6ae196c15e9950afde19d48be12c ]

Commit f66de3ee2c16 ("net/tls: Split conf to rx + tx") made
freeing of IV and record sequence number conditional to SW
path only, but commit e8f69799810c ("net/tls: Add generic NIC
offload infrastructure") also allocates that state for the
device offload configuration.  Remember to free it.

Fixes: e8f69799810c ("net/tls: Add generic NIC offload infrastructure")
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Dirk van der Merwe <dirk.vandermerwe@netronome.com>
Reviewed-by: Simon Horman <simon.horman@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
net/tls/tls_device.c