summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWonki Kim <wonki_.kim@samsung.com>2020-02-18 00:58:16 +0000
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2020-02-19 15:20:34 +0100
commit94425987688b8c95249984d0328cd857c466361e (patch)
tree908778adffe0e63814574d6a6d3e7cdd0a2b87e9
parentc00c85c166d130f7737a7f889127f5d6d2f9163b (diff)
ecore_con: fix to check a return value of functions
this path fixes to check a return value of functions. Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de> Differential Revision: https://phab.enlightenment.org/D11371
-rw-r--r--src/lib/ecore_con/efl_net_ssl_conn-openssl.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/lib/ecore_con/efl_net_ssl_conn-openssl.c b/src/lib/ecore_con/efl_net_ssl_conn-openssl.c
index fc8fb2e95f..8e7339c2ea 100644
--- a/src/lib/ecore_con/efl_net_ssl_conn-openssl.c
+++ b/src/lib/ecore_con/efl_net_ssl_conn-openssl.c
@@ -152,12 +152,18 @@ __efl_net_socket_bio_get(void)
152 if (efl_net_socket_bio) return efl_net_socket_bio; 152 if (efl_net_socket_bio) return efl_net_socket_bio;
153 efl_net_socket_bio = BIO_meth_new(0x400 /* 0x400 means source & sink */, 153 efl_net_socket_bio = BIO_meth_new(0x400 /* 0x400 means source & sink */,
154 "efl_net_socket wrapper"); 154 "efl_net_socket wrapper");
155 BIO_meth_set_write(efl_net_socket_bio, efl_net_socket_bio_write); 155 if (!efl_net_socket_bio) return NULL;
156 BIO_meth_set_read(efl_net_socket_bio, efl_net_socket_bio_read); 156 if (!BIO_meth_set_write(efl_net_socket_bio, efl_net_socket_bio_write)
157 BIO_meth_set_puts(efl_net_socket_bio, efl_net_socket_bio_puts); 157 || !BIO_meth_set_read(efl_net_socket_bio, efl_net_socket_bio_read)
158 BIO_meth_set_ctrl(efl_net_socket_bio, efl_net_socket_bio_ctrl); 158 || !BIO_meth_set_puts(efl_net_socket_bio, efl_net_socket_bio_puts)
159 BIO_meth_set_create(efl_net_socket_bio, efl_net_socket_bio_create); 159 || !BIO_meth_set_ctrl(efl_net_socket_bio, efl_net_socket_bio_ctrl)
160 BIO_meth_set_destroy(efl_net_socket_bio, efl_net_socket_bio_destroy); 160 || !BIO_meth_set_create(efl_net_socket_bio, efl_net_socket_bio_create)
161 || !BIO_meth_set_destroy(efl_net_socket_bio, efl_net_socket_bio_destroy))
162 {
163 BIO_meth_free(efl_net_socket_bio);
164 efl_net_socket_bio = NULL;
165 return NULL;
166 }
161 // FIXME: some day we need to clean up, but for now a singleton alloc is ok 167 // FIXME: some day we need to clean up, but for now a singleton alloc is ok
162 // BIO_meth_free(efl_net_socket_bio); 168 // BIO_meth_free(efl_net_socket_bio);
163 return efl_net_socket_bio; 169 return efl_net_socket_bio;