summaryrefslogtreecommitdiffstats
path: root/glusterfsd
diff options
context:
space:
mode:
authorAmar Tumballi <amarts@redhat.com>2018-08-27 18:19:58 +0530
committerAmar Tumballi <amarts@redhat.com>2018-08-31 01:25:32 +0000
commit6a2f83caad7ff882e3a8da5fdec4be8ceccbfdc2 (patch)
tree01d818a88f1a3c8a11667c5e21e6131d0103ccc1 /glusterfsd
parent33f53e88c31394ef5b0b927cd11f8b349647b435 (diff)
coverity: multiple fixes
CID: 1390477, 1124827 updates: bz#789278 Change-Id: I41060d131aec6e58e7267ac8531b29a70f8c4359 Signed-off-by: Amar Tumballi <amarts@redhat.com>
Diffstat (limited to 'glusterfsd')
-rw-r--r--glusterfsd/src/glusterfsd.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/glusterfsd/src/glusterfsd.c b/glusterfsd/src/glusterfsd.c
index 81a73344d6b..c3fea207b6e 100644
--- a/glusterfsd/src/glusterfsd.c
+++ b/glusterfsd/src/glusterfsd.c
@@ -1642,6 +1642,9 @@ glusterfs_ctx_defaults_init (glusterfs_ctx_t *ctx)
struct rlimit lim = {0, };
int ret = -1;
+ if (!ctx)
+ return ret;
+
ret = xlator_mem_acct_init (THIS, gfd_mt_end);
if (ret != 0) {
gf_msg(THIS->name, GF_LOG_CRITICAL, 0, glusterfsd_msg_34,
@@ -1774,7 +1777,7 @@ glusterfs_ctx_defaults_init (glusterfs_ctx_t *ctx)
ret = 0;
out:
- if (ret && ctx) {
+ if (ret) {
if (ctx->pool) {
mem_pool_destroy (ctx->pool->frame_mem_pool);
mem_pool_destroy (ctx->pool->stack_mem_pool);