summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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);