summaryrefslogtreecommitdiffstats
path: root/xlators/features
diff options
context:
space:
mode:
authorRajesh Joseph <rjoseph@redhat.com>2016-05-24 14:33:54 +0530
committerJeff Darcy <jdarcy@redhat.com>2016-05-31 11:54:51 -0700
commitf55a973e581aaa25bbe38be83e007e1b2eaed659 (patch)
tree90bddfb0c9af1032fc0241df57503c7ba52aafd6 /xlators/features
parent03880f81dad9fd2a3a07c56a3cfbb994d44819b7 (diff)
snapshot/uss: client-side log is filled with "invalid-argument" error
xdata is used without checking if it is NULL or not. Change-Id: Ib6ddaab28ec3b430b8d646aada0456d3cc9978cb BUG: 1339149 Signed-off-by: Rajesh Joseph <rjoseph@redhat.com> Reviewed-on: http://review.gluster.org/14511 Smoke: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra Talur <rtalur@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Diffstat (limited to 'xlators/features')
-rw-r--r--xlators/features/snapview-client/src/snapview-client.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/xlators/features/snapview-client/src/snapview-client.c b/xlators/features/snapview-client/src/snapview-client.c
index d16f10e2991..6eb7cc071c2 100644
--- a/xlators/features/snapview-client/src/snapview-client.c
+++ b/xlators/features/snapview-client/src/snapview-client.c
@@ -1662,6 +1662,9 @@ gf_svc_readdirp_lookup_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
local = frame->local;
+ if (local->xdata != NULL)
+ dict_unref (xdata);
+
if (op_ret) {
op_ret = 0;
op_errno = ENOENT;
@@ -1799,7 +1802,10 @@ gf_svc_readdir_on_special_dir (call_frame_t *frame, void *cookie,
}
local->cookie = cookie;
- local->xdata = dict_ref (xdata);
+ if (xdata == NULL)
+ local->xdata = NULL;
+ else
+ local->xdata = dict_ref (xdata);
STACK_WIND (frame, gf_svc_readdirp_lookup_cbk,
SECOND_CHILD (this),
SECOND_CHILD (this)->fops->lookup, loc, tmp_xdata);