summaryrefslogtreecommitdiffstats
path: root/xlators/features
diff options
context:
space:
mode:
authorAshish Pandey <aspandey@redhat.com>2017-11-04 20:44:04 +0530
committerJeff Darcy <jeff@pl.atyp.us>2017-11-08 02:15:29 +0000
commitb236fa1adbee104ec91b892d9a8d9ce29d5a546d (patch)
treeacfa364f172e8d9849b0707b78cae89ac360040f /xlators/features
parent8df155bf0ff10574adbf06cc9383916a1ff4c932 (diff)
snapview: Coverity Fixes
Coverity ID: 259 Coverity ID: 163 Change-Id: I7f7753b870715e1176826fb8dfbe81119750d113 BUG: 789278 Signed-off-by: Ashish Pandey <aspandey@redhat.com>
Diffstat (limited to 'xlators/features')
-rw-r--r--xlators/features/snapview-client/src/snapview-client.c2
-rw-r--r--xlators/features/snapview-server/src/snapview-server.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/xlators/features/snapview-client/src/snapview-client.c b/xlators/features/snapview-client/src/snapview-client.c
index d9bd56814bf..63ed160bd71 100644
--- a/xlators/features/snapview-client/src/snapview-client.c
+++ b/xlators/features/snapview-client/src/snapview-client.c
@@ -1716,7 +1716,7 @@ gf_svc_readdirp_lookup_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
out:
SVC_STACK_UNWIND (readdirp, frame, op_ret, op_errno, &entries,
- local->xdata);
+ local ? local->xdata : NULL);
gf_dirent_free (&entries);
diff --git a/xlators/features/snapview-server/src/snapview-server.c b/xlators/features/snapview-server/src/snapview-server.c
index 22b0e1c6507..8fee435de64 100644
--- a/xlators/features/snapview-server/src/snapview-server.c
+++ b/xlators/features/snapview-server/src/snapview-server.c
@@ -58,10 +58,12 @@ svs_lookup_entry_point (xlator_t *this, loc_t *loc, inode_t *parent,
*op_errno = ENOMEM;
goto out;
}
+
gf_uuid_copy (inode_ctx->pargfid, loc->pargfid);
memcpy (&inode_ctx->buf, buf, sizeof (*buf));
inode_ctx->type = SNAP_VIEW_ENTRY_POINT_INODE;
} else {
+ inode_ctx = svs_inode_ctx_get (this, loc->inode);
if (inode_ctx) {
memcpy (buf, &inode_ctx->buf, sizeof (*buf));
svs_iatt_fill (inode_ctx->pargfid, postparent);