diff options
-rw-r--r-- | libglusterfs/src/xlator.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libglusterfs/src/xlator.c b/libglusterfs/src/xlator.c index 67ee3287402..986b533df2a 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; } |