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 c34055b..384c0e1 100644
--- a/xlators/meta/src/meta-defaults.c
+++ b/xlators/meta/src/meta-defaults.c
@@ -153,6 +153,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);
@@ -164,6 +167,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;
}