summaryrefslogtreecommitdiffstats
path: root/rpc
diff options
context:
space:
mode:
authorAmar Tumballi <amarts@redhat.com>2019-05-20 11:11:39 +0530
committerAmar Tumballi <amarts@redhat.com>2019-06-04 10:30:29 +0000
commite7aeab3063ac5645136303278b477d7de35266c0 (patch)
tree73ab2e1ea4e26b1019318178d114c3d89dc34301 /rpc
parentabc4d4cfa01d922c46ebb1abfa5d801ba8c6b5c8 (diff)
across: clang-scan: fix NULL dereferencing warnings
All these checks are done after analyzing clang-scan report produced by the CI job @ https://build.gluster.org/job/clang-scan updates: bz#1622665 Change-Id: I590305af4ceb779be952974b2a36066ffc4865ca Signed-off-by: Amar Tumballi <amarts@redhat.com>
Diffstat (limited to 'rpc')
-rw-r--r--rpc/rpc-transport/socket/src/socket.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/rpc/rpc-transport/socket/src/socket.c b/rpc/rpc-transport/socket/src/socket.c
index fe25f73526b..48f6116c458 100644
--- a/rpc/rpc-transport/socket/src/socket.c
+++ b/rpc/rpc-transport/socket/src/socket.c
@@ -269,11 +269,9 @@ ssl_do(rpc_transport_t *this, void *buf, size_t len, SSL_trinary_func *func)
}
r = func(priv->ssl_ssl, buf, len);
} else {
- /*
- * We actually need these functions to get to
- * priv->connected == 1.
- */
- r = ((SSL_unary_func *)func)(priv->ssl_ssl);
+ /* This should be treated as error */
+ gf_log(this->name, GF_LOG_ERROR, "buffer is empty %s", __func__);
+ goto out;
}
switch (SSL_get_error(priv->ssl_ssl, r)) {
case SSL_ERROR_NONE: