cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
* [Cluster-devel] [PATCH 1/2] fsck.gfs2: Fix a potential memory leak in pass3
@ 2016-05-10 14:43 Andrew Price
  2016-05-10 14:43 ` [Cluster-devel] [PATCH 2/2] gfs2_edit savemeta: Fix use of uninitialized 'blk' Andrew Price
  0 siblings, 1 reply; 2+ messages in thread
From: Andrew Price @ 2016-05-10 14:43 UTC (permalink / raw)
  To: cluster-devel.redhat.com

Coverity spotted an instance where pass3() breaks out of the loop
without first freeing the inode.

Signed-off-by: Andrew Price <anprice@redhat.com>
---
 gfs2/fsck/pass3.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/gfs2/fsck/pass3.c b/gfs2/fsck/pass3.c
index fbf8318..85d7e36 100644
--- a/gfs2/fsck/pass3.c
+++ b/gfs2/fsck/pass3.c
@@ -267,6 +267,7 @@ int pass3(struct gfs2_sbd *sdp)
 					    " (y/n) "))) {
 					log_err( _("The block was not "
 						   "cleared\n"));
+					fsck_inode_put(&ip);
 					break;
 				}
 				log_warn( _("inode %lld (0x%llx) is now "
-- 
2.4.11



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-05-10 14:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-10 14:43 [Cluster-devel] [PATCH 1/2] fsck.gfs2: Fix a potential memory leak in pass3 Andrew Price
2016-05-10 14:43 ` [Cluster-devel] [PATCH 2/2] gfs2_edit savemeta: Fix use of uninitialized 'blk' Andrew Price

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).