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-11-2012, 05:21 PM
Andrew Price
 
Default fsck.gfs2: Plug a leak in init_system_inodes()

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

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

diff --git a/gfs2/fsck/initialize.c b/gfs2/fsck/initialize.c
index a1f99d6..bab61c1 100644
--- a/gfs2/fsck/initialize.c
+++ b/gfs2/fsck/initialize.c
@@ -688,6 +688,7 @@ static int init_system_inodes(struct gfs2_sbd *sdp)
if (err != sdp->md.statfs->i_di.di_size) {
log_crit(_("Error %d reading statfs file. "
"Aborting.
"), err);
+ free(buf);
goto fail;
}
/* call gfs2_inum_range_in() to retrieve range */
--
1.7.6.5
 

Thread Tools




All times are GMT. The time now is 05:52 AM.

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