aboutsummaryrefslogtreecommitdiffstats
path: root/net/tls/tls_main.c
diff options
context:
space:
mode:
authorJakub Kicinski <jakub.kicinski@netronome.com>2019-04-10 19:23:39 -0400
committerDavid S. Miller <davem@davemloft.net>2019-04-10 20:23:26 -0400
commit903f1a187776bb8d79b13618ec05b25f86318885 (patch)
tree02f075baf7b1d41f666230ab98888e3fab5b4e42 /net/tls/tls_main.c
parent44f5e0480752b356f577aef90a5813299c3c60b1 (diff)
net/tls: fix build without CONFIG_TLS_DEVICE
buildbot noticed that TLS_HW is not defined if CONFIG_TLS_DEVICE=n. Wrap the cleanup branch into an ifdef, tls_device_free_resources_tx() wouldn't be compiled either in this case. Fixes: 35b71a34ada6 ("net/tls: don't leak partially sent record in device mode") Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tls/tls_main.c')
-rw-r--r--net/tls/tls_main.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/tls/tls_main.c b/net/tls/tls_main.c
index a3cca1ef0098..9547cea0ce3b 100644
--- a/net/tls/tls_main.c
+++ b/net/tls/tls_main.c
@@ -287,8 +287,10 @@ static void tls_sk_proto_close(struct sock *sk, long timeout)
287 kfree(ctx->tx.rec_seq); 287 kfree(ctx->tx.rec_seq);
288 kfree(ctx->tx.iv); 288 kfree(ctx->tx.iv);
289 tls_sw_free_resources_tx(sk); 289 tls_sw_free_resources_tx(sk);
290#ifdef CONFIG_TLS_DEVICE
290 } else if (ctx->tx_conf == TLS_HW) { 291 } else if (ctx->tx_conf == TLS_HW) {
291 tls_device_free_resources_tx(sk); 292 tls_device_free_resources_tx(sk);
293#endif
292 } 294 }
293 295
294 if (ctx->rx_conf == TLS_SW) { 296 if (ctx->rx_conf == TLS_SW) {