FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Cluster Development

 
 
LinkBack Thread Tools
 
Old 01-18-2012, 03:39 PM
Andrew Price
 
Default fsck.gfs2: Plug a leak in find_block_ref()

Spotted by coverity: Variable "ip" going out of scope leaks the storage
it points to.

Signed-off-by: Andrew Price <anprice@redhat.com>
---
gfs2/fsck/pass1b.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/gfs2/fsck/pass1b.c b/gfs2/fsck/pass1b.c
index ae6d45c..9e6f376 100644
--- a/gfs2/fsck/pass1b.c
+++ b/gfs2/fsck/pass1b.c
@@ -344,6 +344,7 @@ static int find_block_ref(struct gfs2_sbd *sdp, uint64_t inode)
log_debug( _("Block %lld (0x%llx) is not gfs2 metadata.
"),
(unsigned long long)inode,
(unsigned long long)inode);
+ fsck_inode_put(&ip);
return 1;
}
/* Check to see if this inode was referenced by another by mistake */
--
1.7.7.5
 

Thread Tools




All times are GMT. The time now is 12:52 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org