summaryrefslogtreecommitdiffstats
path: root/xlators/features
diff options
context:
space:
mode:
authorRajesh Joseph <rjoseph@redhat.com>2016-05-24 14:33:54 +0530
committerNiels de Vos <ndevos@redhat.com>2016-08-22 01:52:54 -0700
commitc23a651b7e9fce8a51e3d9656cc64a49ff42aef7 (patch)
tree87736d4453a888d476be93d9f2a7f9f02be7be8f /xlators/features
parent791d706eee153b4d61073ab67e1f77d2558158c9 (diff)
snapshot/uss: client-side log is filled with "invalid-argument" error
xdata is used without checking if it is NULL or not. > 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> (cherry picked from commit f55a973e581aaa25bbe38be83e007e1b2eaed659) BUG: 1367297 Signed-off-by: Rajesh Joseph <rjoseph@redhat.com> Change-Id: Ib6ddaab28ec3b430b8d646aada0456d3cc9978cb Reviewed-on: http://review.gluster.org/15171 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Avra Sengupta <asengupt@redhat.com> Reviewed-by: Niels de Vos <ndevos@redhat.com>
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 218d178f65f..76b4bc3b7f4 100644
--- a/xlators/features/snapview-client/src/snapview-client.c
+++ b/xlators/features/snapview-client/src/snapview-client.c
@@ -1658,6 +1658,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;
@@ -1795,7 +1798,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);