summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/syncop.c
diff options
context:
space:
mode:
Diffstat (limited to 'libglusterfs/src/syncop.c')
-rw-r--r--libglusterfs/src/syncop.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libglusterfs/src/syncop.c b/libglusterfs/src/syncop.c
index 267e4b3a2d1..a341b92d999 100644
--- a/libglusterfs/src/syncop.c
+++ b/libglusterfs/src/syncop.c
@@ -291,7 +291,7 @@ syncop_lookup_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
if (op_ret == 0) {
args->iatt1 = *iatt;
- args->xattr = xattr;
+ args->xattr = dict_ref (xattr);
args->iatt2 = *parent;
}
@@ -313,10 +313,11 @@ syncop_lookup (xlator_t *subvol, loc_t *loc, dict_t *xattr_req,
if (iatt)
*iatt = args.iatt1;
if (xattr_rsp)
- *xattr_rsp = args.xattr;
+ *xattr_rsp = dict_ref (args.xattr);
if (parent)
*parent = args.iatt2;
+ dict_unref (args.xattr);
errno = args.op_errno;
return args.op_ret;
}