From f55a973e581aaa25bbe38be83e007e1b2eaed659 Mon Sep 17 00:00:00 2001 From: Rajesh Joseph Date: Tue, 24 May 2016 14:33:54 +0530 Subject: 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 Reviewed-on: http://review.gluster.org/14511 Smoke: Gluster Build System Reviewed-by: Raghavendra Talur CentOS-regression: Gluster Build System NetBSD-regression: NetBSD Build System --- xlators/features/snapview-client/src/snapview-client.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'xlators/features') 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); -- cgit