diff options
author | Nandaja Varma <nandaja.varma@gmail.com> | 2015-02-11 11:29:20 +0530 |
---|---|---|
committer | Vijay Bellur <vbellur@redhat.com> | 2015-03-31 01:18:00 -0700 |
commit | 2acb5325828a68b06b39ab44e6736c6ad4ca3a06 (patch) | |
tree | 25ee2171d32eae3628499f28948e0bea122de416 /xlators/mount | |
parent | d7374684f648c1e45d695454f95a65acfe6d04e8 (diff) |
fuse: Fixing the coverity issues
Coverity CID:
1124806
1124692
Change-Id: I6dcf245ded9796fb42516eca63211d855262c26f
BUG: 789278
Signed-off-by: Nandaja Varma <nandaja.varma@gmail.com>
Reviewed-on: http://review.gluster.org/9629
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'xlators/mount')
-rw-r--r-- | xlators/mount/fuse/src/fuse-bridge.c | 5 | ||||
-rw-r--r-- | xlators/mount/fuse/src/fuse-helpers.c | 12 |
2 files changed, 11 insertions, 6 deletions
diff --git a/xlators/mount/fuse/src/fuse-bridge.c b/xlators/mount/fuse/src/fuse-bridge.c index 9ce1fdee13d..ec5c6f60fad 100644 --- a/xlators/mount/fuse/src/fuse-bridge.c +++ b/xlators/mount/fuse/src/fuse-bridge.c @@ -4095,6 +4095,11 @@ fuse_first_lookup (xlator_t *this) dict = dict_new (); frame = create_frame (this, this->ctx->pool); + if (!frame) { + gf_log ("fuse", GF_LOG_ERROR, "failed to create frame"); + return -1; + } + frame->root->type = GF_OP_TYPE_FOP; xl = priv->active_subvol; diff --git a/xlators/mount/fuse/src/fuse-helpers.c b/xlators/mount/fuse/src/fuse-helpers.c index 7fc41383c36..a28169a0021 100644 --- a/xlators/mount/fuse/src/fuse-helpers.c +++ b/xlators/mount/fuse/src/fuse-helpers.c @@ -259,16 +259,16 @@ static void get_groups(fuse_private_t *priv, call_frame_t *frame) const gid_list_t *gl; gid_list_t agl; + if (!priv || !priv->gid_cache_timeout) { + frame_fill_groups(frame); + return; + } + if (-1 == priv->gid_cache_timeout) { frame->root->ngrps = 0; return; } - if (!priv->gid_cache_timeout) { - frame_fill_groups(frame); - return; - } - gl = gid_cache_lookup(&priv->gid_cache, frame->root->pid, frame->root->uid, frame->root->gid); if (gl) { @@ -326,7 +326,7 @@ get_call_frame_for_req (fuse_state_t *state) state->lk_owner); } - get_groups(priv, frame); + get_groups(priv, frame); if (priv && priv->client_pid_set) frame->root->pid = priv->client_pid; |