[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190917041346.4802-1-navid.emamdoost@gmail.com>
Date: Mon, 16 Sep 2019 23:13:42 -0500
From: Navid Emamdoost <navid.emamdoost@...il.com>
To: unlisted-recipients:; (no To-header on input)
Cc: emamd001@....edu, smccaman@....edu, kjlu@....edu,
Navid Emamdoost <navid.emamdoost@...il.com>,
David Sterba <dsterba@...e.com>, linux-fsdevel@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH] fs/affs: release memory if affs_init_bitmap fails
In affs_init_bitmap, on error handling path we may release the allocated
memory.
Signed-off-by: Navid Emamdoost <navid.emamdoost@...il.com>
---
fs/affs/bitmap.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/fs/affs/bitmap.c b/fs/affs/bitmap.c
index 5ba9ef2742f6..745ed2cc4b51 100644
--- a/fs/affs/bitmap.c
+++ b/fs/affs/bitmap.c
@@ -347,6 +347,7 @@ int affs_init_bitmap(struct super_block *sb, int *flags)
out:
affs_brelse(bh);
affs_brelse(bmap_bh);
+ kfree(sbi->s_bitmap);
return res;
}
--
2.17.1
Powered by blists - more mailing lists