From 5ccbfdd87bebbc4c65a76c72191ac564ff844df8 Mon Sep 17 00:00:00 2001 From: Pranith Kumar K Date: Mon, 19 Dec 2011 22:10:38 +0530 Subject: libglusterfs: set inode path to be NULL in case of errors Some of the functions calling inode_path, __inode_path are assuming the path to be set to NULL in case of errors. Instead of fixing it in the calling functions, fixing it in the __inode_path function. Change-Id: I77736a2700d3c2c9732a536bcf2a398fe626d54e BUG: 765430 Signed-off-by: Pranith Kumar K Reviewed-on: http://review.gluster.com/810 Tested-by: Gluster Build System Reviewed-by: Jeff Darcy Reviewed-by: Vijay Bellur --- libglusterfs/src/inode.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libglusterfs/src/inode.c b/libglusterfs/src/inode.c index 1f9da30c4..3513691c4 100644 --- a/libglusterfs/src/inode.c +++ b/libglusterfs/src/inode.c @@ -1079,6 +1079,8 @@ out: } } + if (ret < 0) + *bufp = NULL; return ret; } -- cgit