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 |
| All times are GMT. The time now is 08:17 PM. |
VBulletin, Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.