diff options
| author | Sabrina Dubroca <[email protected]> | 2018-01-16 15:04:26 +0000 |
|---|---|---|
| committer | David S. Miller <[email protected]> | 2018-01-17 21:16:03 +0000 |
| commit | cf6d43ef66f416282121f436ce1bee9a25199d52 (patch) | |
| tree | 0e2e7f8c15b36422f69874435375d3445688893f /net/tls/tls_main.c | |
| parent | Merge tag 'linux-can-fixes-for-4.15-20180116' of ssh://gitolite.kernel.org/pu... (diff) | |
| download | kernel-cf6d43ef66f416282121f436ce1bee9a25199d52.tar.gz kernel-cf6d43ef66f416282121f436ce1bee9a25199d52.zip | |
tls: fix sw_ctx leak
During setsockopt(SOL_TCP, TLS_TX), if initialization of the software
context fails in tls_set_sw_offload(), we leak sw_ctx. We also don't
reassign ctx->priv_ctx to NULL, so we can't even do another attempt to
set it up on the same socket, as it will fail with -EEXIST.
Fixes: 3c4d7559159b ('tls: kernel TLS support')
Signed-off-by: Sabrina Dubroca <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'net/tls/tls_main.c')
0 files changed, 0 insertions, 0 deletions
