Spdk/module/sock/posix
Konrad Sztyber a8a7edcd52 sock/ssl: don't free SSL_CTX on accept() failure
SSL_CTX isn't created in accept(), but when a socket on which accept()
is called is created, so it shouldn't be freed when accept() fails, as
this makes the socket unusable (any subsequent operations using SSL_CTX
would be using freed memory).

This caused the segfaults reported in issue #2681, where the second
connection would crash the application.

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I1a01a748c5a34ce3dd0fd3c557b860c0ff314b85
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14355
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Dong Yi <dongx.yi@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
2022-09-07 07:04:11 +00:00
..
Makefile sock: Add support for SSL 2022-06-20 14:59:47 +00:00
posix.c sock/ssl: don't free SSL_CTX on accept() failure 2022-09-07 07:04:11 +00:00