summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/fd.c
diff options
context:
space:
mode:
authorCsaba Henk <csaba@gluster.com>2010-03-24 14:01:36 +0000
committerAnand V. Avati <avati@dev.gluster.com>2010-03-31 09:43:29 -0700
commit41f05fcefc1c192a3f322e827114897ec0ace316 (patch)
treec5500aed5d5f993256a98341b2482fdefaf3c3c1 /libglusterfs/src/fd.c
parentaa6028a600ccfea14d3f047402dfe157047cabdc (diff)
Fix further cppcheck reported issues.
Reported-by: Patrick Matthäi <pmatthaei@debian.org> Signed-off-by: Csaba Henk <csaba@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 420 (fix leaks pointed out by cppcheck static analyzer) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=420
Diffstat (limited to 'libglusterfs/src/fd.c')
-rw-r--r--libglusterfs/src/fd.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libglusterfs/src/fd.c b/libglusterfs/src/fd.c
index b24d0089d21..ee529f35645 100644
--- a/libglusterfs/src/fd.c
+++ b/libglusterfs/src/fd.c
@@ -461,12 +461,13 @@ fd_unref (fd_t *fd)
fd_t *
fd_bind (fd_t *fd)
{
- inode_t *inode = fd->inode;
+ inode_t *inode = NULL;
if (!fd) {
gf_log ("fd.c", GF_LOG_ERROR, "fd is NULL");
return NULL;
}
+ inode = fd->inode;
LOCK (&inode->lock);
{