exfat: fix memory leak in exfat_load_bitmap()

Signed-off-by: Yifeng Zhao <yifeng.zhao@rock-chips.com>
Change-Id: I50523d98e269dea3837bc520a7588bf245a01cd3
This commit is contained in:
Yifeng Zhao
2024-08-26 14:18:22 +08:00
committed by Tao Huang
parent 70046cbf84
commit 6732e1af29

View File

@@ -110,10 +110,14 @@ int exfat_load_bitmap(struct super_block *sb)
return -EIO;
type = exfat_get_entry_type(ep);
if (type == TYPE_UNUSED)
if (type == TYPE_UNUSED) {
brelse(bh);
break;
if (type != TYPE_BITMAP)
}
if (type != TYPE_BITMAP) {
brelse(bh);
continue;
}
if (ep->dentry.bitmap.flags == 0x0) {
int err;