summaryrefslogtreecommitdiffstats
path: root/xlators/storage/posix/src/posix.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/storage/posix/src/posix.c')
-rw-r--r--xlators/storage/posix/src/posix.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/xlators/storage/posix/src/posix.c b/xlators/storage/posix/src/posix.c
index 6b6f7675a89..afc11fa813c 100644
--- a/xlators/storage/posix/src/posix.c
+++ b/xlators/storage/posix/src/posix.c
@@ -1652,11 +1652,12 @@ posix_unlink (call_frame_t *frame, xlator_t *this,
if (!unwind_dict) {
op_ret = 0;
gf_log (this->name, GF_LOG_WARNING,
- "Failed to creating unwind_dict");
+ "Memory allocation failure while "
+ "creating unwind_dict");
goto out;
}
- /* Even if unwind_dict fails to set CTR_RESPONSE_LINK_COUNT_XDATA we will
- * not mark the FOP unsuccessful
+ /* Even if unwind_dict fails to set CTR_RESPONSE_LINK_COUNT_XDATA we
+ * will not mark the FOP unsuccessful
* because this dict is only used by CTR Xlator to clear
* all records if link count == 0*/
op_ret = dict_set_uint32 (unwind_dict, CTR_RESPONSE_LINK_COUNT_XDATA,
@@ -1678,6 +1679,11 @@ out:
close (fd);
}
+ /* unref unwind_dict*/
+ if (unwind_dict) {
+ dict_unref (unwind_dict);
+ }
+
return 0;
}