From 41f05fcefc1c192a3f322e827114897ec0ace316 Mon Sep 17 00:00:00 2001 From: Csaba Henk Date: Wed, 24 Mar 2010 14:01:36 +0000 Subject: Fix further cppcheck reported issues. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reported-by: Patrick Matthäi Signed-off-by: Csaba Henk Signed-off-by: Anand V. Avati BUG: 420 (fix leaks pointed out by cppcheck static analyzer) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=420 --- libglusterfs/src/fd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'libglusterfs/src/fd.c') 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); { -- cgit