summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--xlators/features/marker/src/marker-quota-helper.c3
-rw-r--r--xlators/features/marker/src/marker-quota.c7
2 files changed, 10 insertions, 0 deletions
diff --git a/xlators/features/marker/src/marker-quota-helper.c b/xlators/features/marker/src/marker-quota-helper.c
index d7afd40a6..fba2cdd3f 100644
--- a/xlators/features/marker/src/marker-quota-helper.c
+++ b/xlators/features/marker/src/marker-quota-helper.c
@@ -362,6 +362,9 @@ quota_local_unref (xlator_t *this, quota_local_t *local)
if (local->ref > 0)
goto out;
+ if (local->fd != NULL)
+ fd_unref (local->fd);
+
loc_wipe (&local->loc);
loc_wipe (&local->parent_loc);
diff --git a/xlators/features/marker/src/marker-quota.c b/xlators/features/marker/src/marker-quota.c
index 9a7bf868d..b07a7d13e 100644
--- a/xlators/features/marker/src/marker-quota.c
+++ b/xlators/features/marker/src/marker-quota.c
@@ -1791,11 +1791,14 @@ mq_reduce_parent_size_xattr (call_frame_t *frame, void *cookie,
STACK_WIND (frame, mq_inode_remove_done, FIRST_CHILD(this),
FIRST_CHILD(this)->fops->xattrop, &local->parent_loc,
GF_XATTROP_ADD_ARRAY64, dict);
+ dict_unref (dict);
return 0;
err:
local->err = 1;
mq_inode_remove_done (frame, NULL, this, -1, 0, NULL);
+ if (dict)
+ dict_unref (dict);
return 0;
}
@@ -1862,6 +1865,10 @@ reduce_parent_size (xlator_t *this, loc_t *loc)
ret = 0;
out:
+ if (ret < 0) {
+ quota_local_unref (this, local);
+ GF_FREE (local);
+ }
return ret;
}