summaryrefslogtreecommitdiffstats
path: root/libglusterfs
diff options
context:
space:
mode:
Diffstat (limited to 'libglusterfs')
-rw-r--r--libglusterfs/src/xlator.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/libglusterfs/src/xlator.c b/libglusterfs/src/xlator.c
index 67ee32874..986b533df 100644
--- a/libglusterfs/src/xlator.c
+++ b/libglusterfs/src/xlator.c
@@ -1188,6 +1188,13 @@ loc_copy (loc_t *dst, loc_t *src)
ret = 0;
out:
+ if (ret == -1) {
+ if (dst->inode)
+ inode_unref (dst->inode);
+
+ if (dst->parent)
+ inode_unref (dst->parent);
+ }
return ret;
}