From 1177c20a59043aec3035a9138958c26017d1c7f1 Mon Sep 17 00:00:00 2001 From: Andy Green Date: Thu, 16 Nov 2017 09:54:56 +0800 Subject: [PATCH] client: handle bio_create failing --- lib/client/client.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/client/client.c b/lib/client/client.c index 20450aa92..76d75819a 100644 --- a/lib/client/client.c +++ b/lib/client/client.c @@ -258,9 +258,10 @@ start_ws_handshake: #ifdef LWS_OPENSSL_SUPPORT /* we can retry this... just cook the SSL BIO the first time */ - if (wsi->use_ssl && !wsi->ssl) { - if (lws_ssl_client_bio_create(wsi)) - return -1; + if (wsi->use_ssl && !wsi->ssl && + lws_ssl_client_bio_create(wsi) < 0) { + cce = "bio_create failed"; + goto bail3; } if (wsi->use_ssl) {