summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/fd.c
diff options
context:
space:
mode:
authorShehjar Tikoo <shehjart@gluster.com>2010-02-25 15:37:51 +0000
committerAnand V. Avati <avati@dev.gluster.com>2010-03-04 03:12:30 -0800
commitefa1ce755bca123507997e6b5f3e27482fc0e3af (patch)
tree6707dc3a68a64c8dd0d2e46b31c72aa0d979b08b /libglusterfs/src/fd.c
parentac93e41b70d27c077ac295a1c288938156f241b0 (diff)
core: Add NULL check for inode in fd_lookup
Signed-off-by: Shehjar Tikoo <shehjart@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 597 (miscellaneous fixes for xlators to work well with NFS xlator) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=597
Diffstat (limited to 'libglusterfs/src/fd.c')
-rw-r--r--libglusterfs/src/fd.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libglusterfs/src/fd.c b/libglusterfs/src/fd.c
index c6b060c61a5..4febb9f59e4 100644
--- a/libglusterfs/src/fd.c
+++ b/libglusterfs/src/fd.c
@@ -511,6 +511,9 @@ fd_lookup (inode_t *inode, pid_t pid)
fd_t *fd = NULL;
fd_t *iter_fd = NULL;
+ if (!inode)
+ return NULL;
+
LOCK (&inode->lock);
{
if (list_empty (&inode->fd_list)) {