summaryrefslogtreecommitdiffstats
path: root/xlators/meta/src/meta-defaults.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/meta/src/meta-defaults.c')
-rw-r--r--xlators/meta/src/meta-defaults.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/xlators/meta/src/meta-defaults.c b/xlators/meta/src/meta-defaults.c
index 5a8558291ba..045fe79dbbc 100644
--- a/xlators/meta/src/meta-defaults.c
+++ b/xlators/meta/src/meta-defaults.c
@@ -148,6 +148,9 @@ meta_default_readv (call_frame_t *frame, xlator_t *this, fd_t *fd, size_t size,
return default_readv_failure_cbk (frame, ENOMEM);
}
+ /* iobref would have taken a ref */
+ iobuf_unref (iobuf);
+
iov.iov_base = iobuf_ptr (iobuf);
copy_offset = min (meta_fd->size, offset);
@@ -159,6 +162,8 @@ meta_default_readv (call_frame_t *frame, xlator_t *this, fd_t *fd, size_t size,
META_STACK_UNWIND (readv, frame, copy_size, 0, &iov, 1, &iatt, iobref, 0);
+ iobref_unref (iobref);
+
return 0;
}