summaryrefslogtreecommitdiffstats
path: root/xlators/features/gfid-access/src/gfid-access.h
diff options
context:
space:
mode:
authorPranith Kumar K <pkarampu@redhat.com>2014-06-08 11:23:26 +0530
committerVijay Bellur <vbellur@redhat.com>2014-06-10 08:01:13 -0700
commit99781d55f16373e793138c7b011eea09a62075b9 (patch)
tree7a4296f51a85dc197dff9b978437a8e61101bf44 /xlators/features/gfid-access/src/gfid-access.h
parent94260c93a144b52964a27ddc9eaef869a3e8f354 (diff)
features/gfid-access: Fix inode leaks and loc path corruption
Change-Id: Ib506db28415d57b344aa90e07e74666ad2063c64 BUG: 1104919 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/8009 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kotresh HR <khiremat@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'xlators/features/gfid-access/src/gfid-access.h')
-rw-r--r--xlators/features/gfid-access/src/gfid-access.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/xlators/features/gfid-access/src/gfid-access.h b/xlators/features/gfid-access/src/gfid-access.h
index e883eca696c..9bc4d2dfd2d 100644
--- a/xlators/features/gfid-access/src/gfid-access.h
+++ b/xlators/features/gfid-access/src/gfid-access.h
@@ -34,7 +34,6 @@
#define GFID_ACCESS_GET_VALID_DIR_INODE(x,l,unref,lbl) do { \
int ret = 0; \
uint64_t value = 0; \
- inode_t *tmp_inode = NULL; \
\
/* if its an entry operation, on the virtual */ \
/* directory inode as parent, we need to handle */ \
@@ -43,8 +42,8 @@
ret = inode_ctx_get (l->parent, x, &value); \
if (ret) \
goto lbl; \
- tmp_inode = (inode_t *)value; \
- l->parent = inode_ref (tmp_inode); \
+ unref = (inode_t *)value; \
+ l->parent = inode_ref (unref); \
/* if parent is virtual, no need to handle */ \
/* loc->inode */ \
break; \
@@ -57,8 +56,8 @@
ret = inode_ctx_get (l->inode, x, &value); \
if (ret) \
goto lbl; \
- tmp_inode = (inode_t *)value; \
- l->inode = inode_ref (tmp_inode); \
+ unref = (inode_t *)value; \
+ l->inode = inode_ref (unref); \
} \
\
} while (0)